mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-26 14:46:42 +00:00
cmd/utils: Allow --bzzaccount to specify an account ID or an address
This commit is contained in:
parent
4d59db2988
commit
801e57f14f
1 changed files with 6 additions and 6 deletions
|
|
@ -811,13 +811,13 @@ func MakeSystemNode(name, version string, relconf release.Config, extra []byte,
|
||||||
|
|
||||||
// bzz. Swarm
|
// bzz. Swarm
|
||||||
var bzzconfig *bzzapi.Config
|
var bzzconfig *bzzapi.Config
|
||||||
hexaddr := ctx.GlobalString(SwarmAccountAddrFlag.Name)
|
accountid := ctx.GlobalString(SwarmAccountAddrFlag.Name)
|
||||||
if hexaddr != "" {
|
if accountid != "" {
|
||||||
swarmaccount := common.HexToAddress(hexaddr)
|
swarmaccount, err := MakeAddress(accman, accountid)
|
||||||
if !accman.HasAddress(swarmaccount) {
|
if err != nil {
|
||||||
Fatalf("swarm account '%v' does not exist: %v", hexaddr, err)
|
Fatalf("swarm account '%v' does not exist: %v'", accountid, err)
|
||||||
}
|
}
|
||||||
prvkey, err := accman.GetUnlocked(swarmaccount)
|
prvkey, err := accman.GetUnlocked(swarmaccount.Address)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
Fatalf("unable to unlock swarm account: %v", err)
|
Fatalf("unable to unlock swarm account: %v", err)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue