Skip to content

Commit

Permalink
fix(core): perform sophisticated boostrap operation
Browse files Browse the repository at this point in the history
  • Loading branch information
Brian Tiger Chow committed Jan 11, 2015
1 parent 1dd8a68 commit b0849fa
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions core/core.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit b0849fa

Please sign in to comment.