mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
cmd/swarm: Make nodekey available for swarm api config
This commit is contained in:
parent
70061520cb
commit
1f097cb946
2 changed files with 3 additions and 3 deletions
|
|
@ -123,14 +123,14 @@ func buildConfig(ctx *cli.Context) (config *bzzapi.Config, err error) {
|
|||
}
|
||||
|
||||
//finally, after the configuration build phase is finished, initialize
|
||||
func initSwarmNode(config *bzzapi.Config, stack *node.Node, ctx *cli.Context) error {
|
||||
func initSwarmNode(config *bzzapi.Config, stack *node.Node, ctx *cli.Context, nodeconfig *node.Config) error {
|
||||
//at this point, all vars should be set in the Config
|
||||
//get the account for the provided swarm account
|
||||
prvkey := getAccount(config.BzzAccount, ctx, stack)
|
||||
//set the resolved config path (geth --datadir)
|
||||
config.Path = expandPath(stack.InstanceDir())
|
||||
//finally, initialize the configuration
|
||||
err := config.Init(prvkey, stack.Server().PrivateKey)
|
||||
err := config.Init(prvkey, nodeconfig.NodeKey())
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
|
|||
|
|
@ -298,7 +298,7 @@ func bzzd(ctx *cli.Context) error {
|
|||
|
||||
//a few steps need to be done after the config phase is completed,
|
||||
//due to overriding behavior
|
||||
err = initSwarmNode(bzzconfig, stack, ctx)
|
||||
err = initSwarmNode(bzzconfig, stack, ctx, &cfg)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue