Skip to content

Commit

Permalink
ignore bootstrap failures in namesys initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
whyrusleeping committed Mar 18, 2015
1 parent d588636 commit 7ad8dd8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 2 additions & 1 deletion core/core.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import (

routing "github.com/jbenet/go-ipfs/routing"
dht "github.com/jbenet/go-ipfs/routing/dht"
kb "github.com/jbenet/go-ipfs/routing/kbucket"
offroute "github.com/jbenet/go-ipfs/routing/offline"

bstore "github.com/jbenet/go-ipfs/blocks/blockstore"
Expand Down Expand Up @@ -145,7 +146,7 @@ func NewIPFSNode(parent context.Context, option ConfigOption) (*IpfsNode, error)
// Setup the mutable ipns filesystem structure
if node.OnlineMode() {
fs, err := ipnsfs.NewFilesystem(ctx, node.DAG, node.Namesys, node.Pinning, node.PrivateKey)
if err != nil {
if err != nil && err != kb.ErrLookupFailure {
return nil, debugerror.Wrap(err)
}
node.IpnsFs = fs
Expand Down
3 changes: 1 addition & 2 deletions routing/dht/lookup.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
peer "github.com/jbenet/go-ipfs/p2p/peer"
kb "github.com/jbenet/go-ipfs/routing/kbucket"
u "github.com/jbenet/go-ipfs/util"
errors "github.com/jbenet/go-ipfs/util/debugerror"
pset "github.com/jbenet/go-ipfs/util/peerset"
)

Expand All @@ -26,7 +25,7 @@ func (dht *IpfsDHT) GetClosestPeers(ctx context.Context, key u.Key) (<-chan peer
e := log.EventBegin(ctx, "getClosestPeers", &key)
tablepeers := dht.routingTable.NearestPeers(kb.ConvertKey(key), AlphaValue)
if len(tablepeers) == 0 {
return nil, errors.Wrap(kb.ErrLookupFailure)
return nil, kb.ErrLookupFailure
}

out := make(chan peer.ID, KValue)
Expand Down

0 comments on commit 7ad8dd8

Please sign in to comment.