提交 63c0d416 作者: Brian Tiger Chow

fix(core): perform sophisticated boostrap operation

上级 033e33da
......@@ -269,14 +269,13 @@ func (n *IpfsNode) Resolve(k util.Key) (*merkledag.Node, error) {
return (&path.Resolver{n.DAG}).ResolvePath(k.String())
}
// Bootstrap is undefined when node is not in OnlineMode
func (n *IpfsNode) Bootstrap(ctx context.Context, peers []peer.PeerInfo) error {
// TODO what should return value be when in offlineMode?
if n.DHT != nil {
for _, p := range peers {
// TODO bootstrap(ctx, n.PeerHost, n.DHT, n.Peerstore, peers)
if err := n.DHT.Connect(ctx, p.ID); err != nil {
return err
}
}
return bootstrap(ctx, n.PeerHost, n.DHT, n.Peerstore, peers)
}
return nil
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论