core/txpool/blobpool: use nonce from argument instead of tx.Nonce() (#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.
pull/30158/head
minh-bq 4 months ago committed by GitHub
parent cf0378499f
commit a0631f3ebd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 2
      core/txpool/blobpool/blobpool.go

@ -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
},

Loading…
Cancel
Save