Skip to content

Commit 5c19ce7

Browse files
authored
refactor(txpool): reuse cached gas_limit value (#19052)
1 parent f6a583f commit 5c19ce7

File tree

1 file changed

+1
-1
lines changed
  • crates/transaction-pool/src/validate

1 file changed

+1
-1
lines changed

crates/transaction-pool/src/validate/eth.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,7 @@ where
396396
// max possible tx fee is (gas_price * gas_limit)
397397
// (if EIP1559) max possible tx fee is (max_fee_per_gas * gas_limit)
398398
let gas_price = transaction.max_fee_per_gas();
399-
let max_tx_fee_wei = gas_price.saturating_mul(transaction.gas_limit() as u128);
399+
let max_tx_fee_wei = gas_price.saturating_mul(transaction_gas_limit as u128);
400400
if max_tx_fee_wei > tx_fee_cap_wei {
401401
return Err(TransactionValidationOutcome::Invalid(
402402
transaction,

0 commit comments

Comments
 (0)