From 29620ff72629fa1d6a70d2ba7351a0fd920cd0f6 Mon Sep 17 00:00:00 2001 From: marcello33 Date: Wed, 14 Jun 2023 17:05:51 +0200 Subject: [PATCH] dev: fix: ineffassign lint errors --- eth/ethconfig/config.go | 11 ++++------- eth/tracers/api.go | 3 --- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/eth/ethconfig/config.go b/eth/ethconfig/config.go index d156b9f14f..a3d63d0c8b 100644 --- a/eth/ethconfig/config.go +++ b/eth/ethconfig/config.go @@ -255,13 +255,10 @@ func CreateConsensusEngine(stack *node.Node, chainConfig *params.ChainConfig, et var engine consensus.Engine if cliqueConfig != nil { engine = clique.New(cliqueConfig, db) - } - - // If Matic bor consensus is requested, set it up - // In order to pass the ethereum transaction tests, we need to set the burn contract which is in the bor config - // Then, bor != nil will also be enabled for ethash and clique. Only enable Bor for real if there is a validator contract present. - - if chainConfig.Bor != nil && chainConfig.Bor.ValidatorContract != "" { + // If Matic bor consensus is requested, set it up + // In order to pass the ethereum transaction tests, we need to set the burn contract which is in the bor config + // Then, bor != nil will also be enabled for ethash and clique. Only enable Bor for real if there is a validator contract present. + } else if chainConfig.Bor != nil && chainConfig.Bor.ValidatorContract != "" { genesisContractsClient := contract.NewGenesisContractsClient(chainConfig, chainConfig.Bor.ValidatorContract, chainConfig.Bor.StateReceiverContract, blockchainAPI) spanner := span.NewChainSpanner(blockchainAPI, contract.ValidatorSet(), chainConfig, common.HexToAddress(chainConfig.Bor.ValidatorContract)) diff --git a/eth/tracers/api.go b/eth/tracers/api.go index fb3af662f4..b376fc7b1d 100644 --- a/eth/tracers/api.go +++ b/eth/tracers/api.go @@ -365,10 +365,7 @@ func (api *API) traceChain(start, end *types.Block, config *TraceConfig, closed if stateSyncPresent && i == len(txs)-1 { if *config.BorTraceEnabled { config.BorTx = newBoolPtr(true) - res, err = api.traceTx(ctx, msg, txctx, blockCtx, task.statedb, config) } - } else { - res, err = api.traceTx(ctx, msg, txctx, blockCtx, task.statedb, config) } res, err = api.traceTx(ctx, msg, txctx, blockCtx, task.statedb, config)