Skip to content

Commit 77f577a

Browse files
committed
cmd/utils: not set Etherbase when flag --unlock is set
1 parent 92fb0ca commit 77f577a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

cmd/utils/flags.go

+4-1
Original file line numberDiff line numberDiff line change
@@ -1095,7 +1095,10 @@ func setEtherbase(ctx *cli.Context, ks *keystore.KeyStore, cfg *ethconfig.Config
10951095
}
10961096
cfg.Etherbase = account.Address
10971097
} else {
1098-
cfg.Etherbase = common.HexToAddress(ctx.String(MinerEtherbaseFlag.Name))
1098+
if !ctx.IsSet(UnlockedAccountFlag.Name) {
1099+
cfg.Etherbase = common.HexToAddress(ctx.String(MinerEtherbaseFlag.Name))
1100+
log.Info("Set etherbase", "address", cfg.Etherbase.Hex())
1101+
}
10991102
}
11001103
}
11011104

0 commit comments

Comments
 (0)