Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
dms3
go-merkledag
Commits
6fec6bba
Commit
6fec6bba
authored
Dec 16, 2014
by
Jeromy
Committed by
Juan Batiz-Benet
Dec 17, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
change Provide RPC to not wait for an ACK, improves performance of 'Add' operations
parent
b1e1ba8a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
merkledag.go
merkledag.go
+3
-1
No files found.
merkledag.go
View file @
6fec6bba
...
...
@@ -2,6 +2,7 @@
package
merkledag
import
(
"bytes"
"fmt"
"sync"
"time"
...
...
@@ -294,8 +295,9 @@ func FetchGraph(ctx context.Context, root *Node, serv DAGService) chan struct{}
// returns the indexes of any links pointing to it
func
FindLinks
(
n
*
Node
,
k
u
.
Key
)
[]
int
{
var
out
[]
int
keybytes
:=
[]
byte
(
k
)
for
i
,
lnk
:=
range
n
.
Links
{
if
u
.
Key
(
lnk
.
Hash
)
==
k
{
if
bytes
.
Equal
([]
byte
(
lnk
.
Hash
),
keybytes
)
{
out
=
append
(
out
,
i
)
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment