mirror of
https://github.com/ipfs/kubo.git
synced 2026-02-24 11:57:44 +08:00
ignore bootstrap failures in namesys initialization
This commit is contained in:
parent
d588636ce8
commit
7ad8dd8523
@ -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
|
||||
|
||||
@ -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)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user