mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-26 06:36:43 +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
|
||||
var bzzconfig *bzzapi.Config
|
||||
hexaddr := ctx.GlobalString(SwarmAccountAddrFlag.Name)
|
||||
if hexaddr != "" {
|
||||
swarmaccount := common.HexToAddress(hexaddr)
|
||||
if !accman.HasAddress(swarmaccount) {
|
||||
Fatalf("swarm account '%v' does not exist: %v", hexaddr, err)
|
||||
accountid := ctx.GlobalString(SwarmAccountAddrFlag.Name)
|
||||
if accountid != "" {
|
||||
swarmaccount, err := MakeAddress(accman, accountid)
|
||||
if err != nil {
|
||||
Fatalf("swarm account '%v' does not exist: %v'", accountid, err)
|
||||
}
|
||||
prvkey, err := accman.GetUnlocked(swarmaccount)
|
||||
prvkey, err := accman.GetUnlocked(swarmaccount.Address)
|
||||
if err != nil {
|
||||
Fatalf("unable to unlock swarm account: %v", err)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue