mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
Allow replacement txs with exactly price bump (#13161)
This commit is contained in:
@ -405,8 +405,7 @@ impl<T: PoolTransaction> ValidPoolTransaction<T> {
|
||||
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<T: PoolTransaction> ValidPoolTransaction<T> {
|
||||
// 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<T: PoolTransaction> ValidPoolTransaction<T> {
|
||||
// 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
|
||||
|
||||
Reference in New Issue
Block a user