Skip to content

Commit

Permalink
cmd/utils: not set Etherbase when flag --unlock is set
Browse files Browse the repository at this point in the history
  • Loading branch information
gzliudan committed Feb 21, 2025
1 parent 92fb0ca commit 77f577a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cmd/utils/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -1095,7 +1095,10 @@ func setEtherbase(ctx *cli.Context, ks *keystore.KeyStore, cfg *ethconfig.Config
}
cfg.Etherbase = account.Address
} else {
cfg.Etherbase = common.HexToAddress(ctx.String(MinerEtherbaseFlag.Name))
if !ctx.IsSet(UnlockedAccountFlag.Name) {
cfg.Etherbase = common.HexToAddress(ctx.String(MinerEtherbaseFlag.Name))
log.Info("Set etherbase", "address", cfg.Etherbase.Hex())
}
}
}

Expand Down

0 comments on commit 77f577a

Please sign in to comment.