dev: fix: ineffassign lint errors

This commit is contained in:
marcello33 2023-06-14 17:05:51 +02:00
parent 4307e68288
commit 29620ff726
2 changed files with 4 additions and 10 deletions

View file

@ -255,13 +255,10 @@ func CreateConsensusEngine(stack *node.Node, chainConfig *params.ChainConfig, et
var engine consensus.Engine var engine consensus.Engine
if cliqueConfig != nil { if cliqueConfig != nil {
engine = clique.New(cliqueConfig, db) 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
// If Matic bor consensus is requested, set it up // Then, bor != nil will also be enabled for ethash and clique. Only enable Bor for real if there is a validator contract present.
// In order to pass the ethereum transaction tests, we need to set the burn contract which is in the bor config } else if chainConfig.Bor != nil && chainConfig.Bor.ValidatorContract != "" {
// 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 != "" {
genesisContractsClient := contract.NewGenesisContractsClient(chainConfig, chainConfig.Bor.ValidatorContract, chainConfig.Bor.StateReceiverContract, blockchainAPI) genesisContractsClient := contract.NewGenesisContractsClient(chainConfig, chainConfig.Bor.ValidatorContract, chainConfig.Bor.StateReceiverContract, blockchainAPI)
spanner := span.NewChainSpanner(blockchainAPI, contract.ValidatorSet(), chainConfig, common.HexToAddress(chainConfig.Bor.ValidatorContract)) spanner := span.NewChainSpanner(blockchainAPI, contract.ValidatorSet(), chainConfig, common.HexToAddress(chainConfig.Bor.ValidatorContract))

View file

@ -365,10 +365,7 @@ func (api *API) traceChain(start, end *types.Block, config *TraceConfig, closed
if stateSyncPresent && i == len(txs)-1 { if stateSyncPresent && i == len(txs)-1 {
if *config.BorTraceEnabled { if *config.BorTraceEnabled {
config.BorTx = newBoolPtr(true) 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) res, err = api.traceTx(ctx, msg, txctx, blockCtx, task.statedb, config)