Skip to content

Commit ebec558

Browse files
committed
core: fix lint
1 parent 8f9b0fb commit ebec558

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

core/blockchain_insert.go

+1
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,7 @@ func (it *insertIterator) next() (*types.Block, error) {
138138
//
139139
// Both header and body validation errors (nil too) is cached into the iterator
140140
// to avoid duplicating work on the following next() call.
141+
// nolint:unused
141142
func (it *insertIterator) peek() (*types.Block, error) {
142143
// If we reached the end of the chain, abort
143144
if it.index+1 >= len(it.chain) {

core/state_prefetcher.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ func (p *statePrefetcher) Prefetch(block *types.Block, statedb *state.StateDB, c
5858

5959
// Iterate over and process the individual transactions
6060
for i, tx := range block.Transactions() {
61-
tx, stateCpy := tx, statedb.Copy() // closure
61+
stateCpy := statedb.Copy() // closure
6262
workers.Go(func() error {
6363
// If block precaching was interrupted, abort
6464
if interrupt != nil && interrupt.Load() {
@@ -69,6 +69,7 @@ func (p *statePrefetcher) Prefetch(block *types.Block, statedb *state.StateDB, c
6969
// Convert the transaction into an executable message and pre-cache its sender
7070
msg, err := TransactionToMessage(tx, signer, header.BaseFee)
7171
if err != nil {
72+
fails.Add(1)
7273
return nil // Also invalid block, bail out
7374
}
7475
stateCpy.SetTxContext(tx.Hash(), i)

0 commit comments

Comments
 (0)