core/types: reduce allocations in GasPriceCmp (#22456)

This commit is contained in:
Daniel Liu 2024-04-28 17:30:17 +08:00
parent 01e1728a94
commit 0ccf119cd7

View file

@ -315,7 +315,7 @@ func (tx *Transaction) RawSignatureValues() (v, r, s *big.Int) {
// GasPriceCmp compares the gas prices of two transactions.
func (tx *Transaction) GasPriceCmp(other *Transaction) int {
return tx.inner.gasPrice().Cmp(other.GasPrice())
return tx.inner.gasPrice().Cmp(other.inner.gasPrice())
}
// GasPriceIntCmp compares the gas price of the transaction against the given price.