Fit linters

This commit is contained in:
Jerry 2023-05-01 21:23:54 -07:00
parent 82390264bc
commit 01dd019c5e
No known key found for this signature in database
GPG key ID: 5B33FA23CB103211
2 changed files with 4 additions and 2 deletions

View file

@ -88,7 +88,7 @@ func (p *StateProcessor) Process(block *types.Block, statedb *state.StateDB, cfg
return nil, nil, 0, fmt.Errorf("could not apply tx %d [%v]: %w", i, tx.Hash().Hex(), err) return nil, nil, 0, fmt.Errorf("could not apply tx %d [%v]: %w", i, tx.Hash().Hex(), err)
} }
statedb.Prepare(tx.Hash(), i) statedb.Prepare(tx.Hash(), i)
receipt, err := applyTransaction(msg, p.config, p.bc, nil, gp, statedb, blockNumber, blockHash, tx, usedGas, vmenv, nil) receipt, err := applyTransaction(msg, p.config, p.bc, nil, gp, statedb, blockNumber, blockHash, tx, usedGas, vmenv, interruptCtx)
if err != nil { if err != nil {
return nil, nil, 0, fmt.Errorf("could not apply tx %d [%v]: %w", i, tx.Hash().Hex(), err) return nil, nil, 0, fmt.Errorf("could not apply tx %d [%v]: %w", i, tx.Hash().Hex(), err)
} }

View file

@ -826,6 +826,7 @@ func (api *API) traceBlock(ctx context.Context, block *types.Block, config *Trac
if stateSyncPresent && i == len(txs)-1 { if stateSyncPresent && i == len(txs)-1 {
if *config.BorTraceEnabled { if *config.BorTraceEnabled {
callmsg := prepareCallMessage(msg) callmsg := prepareCallMessage(msg)
// nolint : contextcheck
if _, err := statefull.ApplyBorMessage(*vmenv, callmsg); err != nil { if _, err := statefull.ApplyBorMessage(*vmenv, callmsg); err != nil {
failed = err failed = err
break break
@ -834,6 +835,7 @@ func (api *API) traceBlock(ctx context.Context, block *types.Block, config *Trac
break break
} }
} else { } else {
// nolint : contextcheck
if _, err := core.ApplyMessage(vmenv, msg, new(core.GasPool).AddGas(msg.Gas()), context.Background()); err != nil { if _, err := core.ApplyMessage(vmenv, msg, new(core.GasPool).AddGas(msg.Gas()), context.Background()); err != nil {
failed = err failed = err
break break
@ -844,7 +846,7 @@ func (api *API) traceBlock(ctx context.Context, block *types.Block, config *Trac
} }
} else { } else {
coinbaseBalance := statedb.GetBalance(blockCtx.Coinbase) coinbaseBalance := statedb.GetBalance(blockCtx.Coinbase)
// nolint : contextcheck
result, err := core.ApplyMessageNoFeeBurnOrTip(vmenv, msg, new(core.GasPool).AddGas(msg.Gas()), context.Background()) result, err := core.ApplyMessageNoFeeBurnOrTip(vmenv, msg, new(core.GasPool).AddGas(msg.Gas()), context.Background())
if err != nil { if err != nil {