Skip to content

Commit a0631f3

Browse files
authored
core/txpool/blobpool: use nonce from argument instead of tx.Nonce() (ethereum#30148)
This does not change the behavior here as the nonce in the argument is tx.Nonce(). This commit helps to make the function easier to read and avoid capturing the tx in the function.
1 parent cf03784 commit a0631f3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/txpool/blobpool/blobpool.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1116,7 +1116,7 @@ func (p *BlobPool) validateTx(tx *types.Transaction) error {
11161116
ExistingCost: func(addr common.Address, nonce uint64) *big.Int {
11171117
next := p.state.GetNonce(addr)
11181118
if uint64(len(p.index[addr])) > nonce-next {
1119-
return p.index[addr][int(tx.Nonce()-next)].costCap.ToBig()
1119+
return p.index[addr][int(nonce-next)].costCap.ToBig()
11201120
}
11211121
return nil
11221122
},

0 commit comments

Comments
 (0)