mirror of
https://github.com/ipfs/kubo.git
synced 2025-09-18 05:31:35 +08:00
some bugfixes and added logging
This commit is contained in:
@ -94,6 +94,7 @@ func addDir(n *core.IpfsNode, fpath string, depth int) (*dag.Node, error) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fmt.Printf("Adding dir: %s = %s\n", fpath)
|
||||||
return tree, addNode(n, tree, fpath)
|
return tree, addNode(n, tree, fpath)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -238,3 +238,5 @@ func (n *IpfsNode) PinDagNode(nd *merkledag.Node) error {
|
|||||||
u.DOut("Pinning node. Currently No-Op\n")
|
u.DOut("Pinning node. Currently No-Op\n")
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (n *IpfsNode) SetIpnsEntry() {}
|
||||||
|
@ -152,15 +152,14 @@ func (dht *IpfsDHT) FindProvidersAsync2(ctx context.Context, key u.Key, count in
|
|||||||
|
|
||||||
peers := dht.routingTables[0].NearestPeers(kb.ConvertKey(key), AlphaValue)
|
peers := dht.routingTables[0].NearestPeers(kb.ConvertKey(key), AlphaValue)
|
||||||
for _, pp := range peers {
|
for _, pp := range peers {
|
||||||
ppp := pp
|
go func(p *peer.Peer) {
|
||||||
go func() {
|
pmes, err := dht.findProvidersSingle(p, key, 0, timeout)
|
||||||
pmes, err := dht.findProvidersSingle(ctx, ppp, key, 0)
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
u.PErr("%v\n", err)
|
u.PErr("%v\n", err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
dht.addPeerListAsync(key, pmes.GetProviderPeers(), ps, count, peerOut)
|
dht.addPeerListAsync(key, pmes.GetPeers(), ps, count, peerOut)
|
||||||
}()
|
}(pp)
|
||||||
}
|
}
|
||||||
|
|
||||||
}()
|
}()
|
||||||
|
Reference in New Issue
Block a user