mirror of
https://github.com/ipfs/kubo.git
synced 2025-06-06 08:20:57 +08:00
startup: always load the private key
Loading this at the last minute means we need a bunch of special cases in *every* command that needs routing, namesys, or even the public key. If we ever have a case where we don't want to do this, we can add an option to the (eventual) IPFS constructor. Handling this up-front is going to be significantly less error prone. Motivation: https://github.com/ipfs/go-ipfs/pull/5825/files#diff-fe35ea64d478c4f3fb767a3f618e5d01R863 License: MIT Signed-off-by: Steven Allen <steven@stebalien.com>
This commit is contained in:
@ -79,18 +79,6 @@ Resolve the value of an IPFS DAG path:
|
||||
return err
|
||||
}
|
||||
|
||||
n, err := cmdenv.GetNode(env)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if !n.OnlineMode() {
|
||||
err := n.SetupOfflineRouting()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
name := req.Arguments[0]
|
||||
recursive, _ := req.Options[resolveRecursiveOptionName].(bool)
|
||||
|
||||
|
Reference in New Issue
Block a user