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

This commit is contained in:
Marius van der Wijden 2021-03-08 14:23:28 +01:00 committed by GitHub
parent 182670849e
commit be87f769f6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -293,7 +293,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.