@cryptotaxi247 / kubo / commits / 7ad8dd852

ignore bootstrap failures in namesys initialization

Jeromy committed Mar 17, 2015 at 21:03 UTC 7ad8dd85238aeaeafe7c0ca58180cc2e92db7bef
2 files changed +3 -3
core/core.go
+2 -1
@@ -26,6 +26,7 @@ import (
26
27 routing "github.com/jbenet/go-ipfs/routing"
28 dht "github.com/jbenet/go-ipfs/routing/dht"
29 + kb "github.com/jbenet/go-ipfs/routing/kbucket"
30 offroute "github.com/jbenet/go-ipfs/routing/offline"
31
32 bstore "github.com/jbenet/go-ipfs/blocks/blockstore"
@@ -145,7 +146,7 @@ func NewIPFSNode(parent context.Context, option ConfigOption) (*IpfsNode, error)
146 // Setup the mutable ipns filesystem structure
147 if node.OnlineMode() {
148 fs, err := ipnsfs.NewFilesystem(ctx, node.DAG, node.Namesys, node.Pinning, node.PrivateKey)
148 - if err != nil {
149 + if err != nil && err != kb.ErrLookupFailure {
150 return nil, debugerror.Wrap(err)
151 }
152 node.IpnsFs = fs
routing/dht/lookup.go
+1 -2
@@ -6,7 +6,6 @@ import (
6 peer "github.com/jbenet/go-ipfs/p2p/peer"
7 kb "github.com/jbenet/go-ipfs/routing/kbucket"
8 u "github.com/jbenet/go-ipfs/util"
9 - errors "github.com/jbenet/go-ipfs/util/debugerror"
9 pset "github.com/jbenet/go-ipfs/util/peerset"
10 )
11
@@ -26,7 +25,7 @@ func (dht *IpfsDHT) GetClosestPeers(ctx context.Context, key u.Key) (<-chan peer
25 e := log.EventBegin(ctx, "getClosestPeers", &key)
26 tablepeers := dht.routingTable.NearestPeers(kb.ConvertKey(key), AlphaValue)
27 if len(tablepeers) == 0 {
29 - return nil, errors.Wrap(kb.ErrLookupFailure)
28 + return nil, kb.ErrLookupFailure
29 }
30
31 out := make(chan peer.ID, KValue)