Commit 6fec6bba authored by Jeromy's avatar Jeromy Committed by Juan Batiz-Benet

change Provide RPC to not wait for an ACK, improves performance of 'Add' operations

parent b1e1ba8a
......@@ -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)
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment