From 4fe5c2a5775aa269dd2ac3dbfa2fd063f63c3fee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ahmet=20Yaz=C4=B1c=C4=B1?= <75089142+yaziciahmet@users.noreply.github.com> Date: Thu, 5 Dec 2024 19:24:28 +0100 Subject: [PATCH] Allow replacement txs with exactly price bump (#13161) --- crates/transaction-pool/src/validate/mod.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/crates/transaction-pool/src/validate/mod.rs b/crates/transaction-pool/src/validate/mod.rs index 84caae6e7c..40f2deeafe 100644 --- a/crates/transaction-pool/src/validate/mod.rs +++ b/crates/transaction-pool/src/validate/mod.rs @@ -405,8 +405,7 @@ impl ValidPoolTransaction { let price_bump = price_bumps.price_bump(self.tx_type()); // Check if the max fee per gas is underpriced. - if maybe_replacement.max_fee_per_gas() <= self.max_fee_per_gas() * (100 + price_bump) / 100 - { + if maybe_replacement.max_fee_per_gas() < self.max_fee_per_gas() * (100 + price_bump) / 100 { return true } @@ -418,7 +417,7 @@ impl ValidPoolTransaction { // Check max priority fee per gas (relevant for EIP-1559 transactions only) if existing_max_priority_fee_per_gas != 0 && replacement_max_priority_fee_per_gas != 0 && - replacement_max_priority_fee_per_gas <= + replacement_max_priority_fee_per_gas < existing_max_priority_fee_per_gas * (100 + price_bump) / 100 { return true @@ -429,7 +428,7 @@ impl ValidPoolTransaction { // This enforces that blob txs can only be replaced by blob txs let replacement_max_blob_fee_per_gas = maybe_replacement.transaction.max_fee_per_blob_gas().unwrap_or_default(); - if replacement_max_blob_fee_per_gas <= + if replacement_max_blob_fee_per_gas < existing_max_blob_fee_per_gas * (100 + price_bump) / 100 { return true