Skip to content

Commit

Permalink
core/types: reduce allocations in GasPriceCmp (ethereum#22456)
Browse files Browse the repository at this point in the history
  • Loading branch information
MariusVanDerWijden authored Mar 8, 2021
1 parent 1826708 commit be87f76
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/types/transaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit be87f76

Please sign in to comment.