mirror of
https://github.com/ipfs/kubo.git
synced 2025-09-09 17:22:21 +08:00
dont create ipnsfs filesystem until its needed
License: MIT Signed-off-by: Jeromy <jeromyj@gmail.com>
This commit is contained in:
10
core/core.go
10
core/core.go
@ -38,7 +38,6 @@ import (
|
||||
|
||||
routing "github.com/ipfs/go-ipfs/routing"
|
||||
dht "github.com/ipfs/go-ipfs/routing/dht"
|
||||
kb "github.com/ipfs/go-ipfs/routing/kbucket"
|
||||
nilrouting "github.com/ipfs/go-ipfs/routing/none"
|
||||
offroute "github.com/ipfs/go-ipfs/routing/offline"
|
||||
|
||||
@ -162,15 +161,6 @@ func NewIPFSNode(ctx context.Context, option ConfigOption) (*IpfsNode, error) {
|
||||
}
|
||||
node.Resolver = &path.Resolver{DAG: node.DAG}
|
||||
|
||||
// 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 && err != kb.ErrLookupFailure {
|
||||
return nil, err
|
||||
}
|
||||
node.IpnsFs = fs
|
||||
}
|
||||
|
||||
success = true
|
||||
return node, nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user