Commit 63c0d416 authored by Brian Tiger Chow's avatar Brian Tiger Chow

fix(core): perform sophisticated boostrap operation

parent 033e33da
...@@ -269,14 +269,13 @@ func (n *IpfsNode) Resolve(k util.Key) (*merkledag.Node, error) { ...@@ -269,14 +269,13 @@ func (n *IpfsNode) Resolve(k util.Key) (*merkledag.Node, error) {
return (&path.Resolver{n.DAG}).ResolvePath(k.String()) 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 { func (n *IpfsNode) Bootstrap(ctx context.Context, peers []peer.PeerInfo) error {
// TODO what should return value be when in offlineMode?
if n.DHT != nil { if n.DHT != nil {
for _, p := range peers { return bootstrap(ctx, n.PeerHost, n.DHT, n.Peerstore, peers)
// TODO bootstrap(ctx, n.PeerHost, n.DHT, n.Peerstore, peers)
if err := n.DHT.Connect(ctx, p.ID); err != nil {
return err
}
}
} }
return nil return nil
} }
......
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