Skip to content

Commit

Permalink
core/txpool/blobpool: use nonce from argument instead of tx.Nonce() (e…
Browse files Browse the repository at this point in the history
…thereum#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.
  • Loading branch information
minh-bq committed Jul 15, 2024
1 parent cf03784 commit a0631f3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/txpool/blobpool/blobpool.go
Original file line number Diff line number Diff line change
Expand Up @@ -1116,7 +1116,7 @@ func (p *BlobPool) validateTx(tx *types.Transaction) error {
ExistingCost: func(addr common.Address, nonce uint64) *big.Int {
next := p.state.GetNonce(addr)
if uint64(len(p.index[addr])) > nonce-next {
return p.index[addr][int(tx.Nonce()-next)].costCap.ToBig()
return p.index[addr][int(nonce-next)].costCap.ToBig()
}
return nil
},
Expand Down

0 comments on commit a0631f3

Please sign in to comment.