From 0ccf119cd742992a7204b4d53f690c579d241ded Mon Sep 17 00:00:00 2001 From: Daniel Liu Date: Sun, 28 Apr 2024 17:30:17 +0800 Subject: [PATCH] core/types: reduce allocations in GasPriceCmp (#22456) --- core/types/transaction.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/types/transaction.go b/core/types/transaction.go index 1bb0275a99..983162943c 100644 --- a/core/types/transaction.go +++ b/core/types/transaction.go @@ -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.