File tree Expand file tree Collapse file tree 1 file changed +2
-8
lines changed Expand file tree Collapse file tree 1 file changed +2
-8
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,6 @@ package utils
2020import (
2121 "context"
2222 "crypto/ecdsa"
23- "encoding/hex"
2423 "encoding/json"
2524 "errors"
2625 "fmt"
@@ -1341,15 +1340,10 @@ func setEtherbase(ctx *cli.Context, cfg *ethconfig.Config) {
13411340 return
13421341 }
13431342 addr := ctx .String (MinerPendingFeeRecipientFlag .Name )
1344- if strings .HasPrefix (addr , "0x" ) || strings .HasPrefix (addr , "0X" ) {
1345- addr = addr [2 :]
1346- }
1347- b , err := hex .DecodeString (addr )
1348- if err != nil || len (b ) != common .AddressLength {
1343+ if ! common .IsHexAddress (addr ) {
13491344 Fatalf ("-%s: invalid pending block producer address %q" , MinerPendingFeeRecipientFlag .Name , addr )
1350- return
13511345 }
1352- cfg .Miner .PendingFeeRecipient = common .BytesToAddress ( b )
1346+ cfg .Miner .PendingFeeRecipient = common .HexToAddress ( addr )
13531347}
13541348
13551349func SetP2PConfig (ctx * cli.Context , cfg * p2p.Config ) {
You can’t perform that action at this time.
0 commit comments