From 85e759fef19eafb8ece78a0b6caa7a7e96cf8bb0 Mon Sep 17 00:00:00 2001 From: Wasif Iqbal Date: Mon, 31 Jul 2023 17:01:06 -0500 Subject: [PATCH] Fix bugs --- cmd/utils/flags.go | 7 +++---- eth/backend.go | 5 ++++- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/cmd/utils/flags.go b/cmd/utils/flags.go index 9e1bd014eb..884c1a3e12 100644 --- a/cmd/utils/flags.go +++ b/cmd/utils/flags.go @@ -582,7 +582,6 @@ var ( MinerBlocklistFileFlag = &cli.StringFlag{ Name: "miner.blocklist", Usage: "[NOTE: Deprecated, please use builder.blacklist] flashbots - Path to JSON file with list of blocked addresses. Miner will ignore txs that touch mentioned addresses.", - Value: "", Category: flags.MinerCategory, } MinerNewPayloadTimeout = &cli.DurationFlag{ @@ -705,7 +704,6 @@ var ( BuilderAlgoTypeFlag = &cli.StringFlag{ Name: "builder.algotype", Usage: "Block building algorithm to use [=mev-geth] (mev-geth, greedy, greedy-buckets)", - Value: "mev-geth", Category: flags.BuilderCategory, } @@ -734,7 +732,6 @@ var ( Usage: "Path to file containing blacklisted addresses, json-encoded list of strings. " + "Builder will ignore transactions that touch mentioned addresses. This flag is also used for block validation API.\n" + "NOTE: builder.validation_blacklist is deprecated and will be removed in the future in favor of builder.blacklist", - Value: "", Aliases: []string{"builder.validation_blacklist"}, Category: flags.BuilderCategory, } @@ -1676,7 +1673,9 @@ func SetP2PConfig(ctx *cli.Context, cfg *p2p.Config) { // SetBuilderConfig applies node-related command line flags to the builder config. func SetBuilderConfig(ctx *cli.Context, cfg *builder.Config) { - cfg.Enabled = ctx.IsSet(BuilderEnabled.Name) + if ctx.IsSet(BuilderEnabled.Name) { + cfg.Enabled = ctx.Bool(BuilderEnabled.Name) + } cfg.EnableValidatorChecks = ctx.IsSet(BuilderEnableValidatorChecks.Name) cfg.EnableLocalRelay = ctx.IsSet(BuilderEnableLocalRelay.Name) cfg.SlotsInEpoch = ctx.Uint64(BuilderSlotsInEpoch.Name) diff --git a/eth/backend.go b/eth/backend.go index 0b68f292c2..b330f005cb 100644 --- a/eth/backend.go +++ b/eth/backend.go @@ -231,7 +231,10 @@ func New(stack *node.Node, config *ethconfig.Config) (*Ethereum, error) { } eth.miner = miner.New(eth, &config.Miner, eth.blockchain.Config(), eth.EventMux(), eth.engine, eth.isLocalBlock) - eth.miner.SetExtra(makeExtraData(config.Miner.ExtraData)) + err = eth.miner.SetExtra(makeExtraData(config.Miner.ExtraData)) + if err != nil { + return nil, err + } eth.APIBackend = &EthAPIBackend{stack.Config().ExtRPCEnabled(), stack.Config().AllowUnprotectedTxs, eth, nil} if eth.APIBackend.allowUnprotectedTxs {