ignore bootstrap failures in namesys initialization

This commit is contained in:
Jeromy 2015-03-17 21:03:37 -07:00
parent d588636ce8
commit 7ad8dd8523
2 changed files with 3 additions and 3 deletions

View File

@ -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"
@ -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

View File

@ -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"
)
@ -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)