@@ -473,7 +473,6 @@ class MemPoolAccept
473473 std::unique_ptr<CTxMemPoolEntry> m_entry;
474474 std::list<CTransactionRef> m_replaced_transactions;
475475
476- bool m_replacement_transaction;
477476 CAmount m_base_fees;
478477 CAmount m_modified_fees;
479478 /* * Total modified fees of all transactions being replaced. */
@@ -555,7 +554,6 @@ bool MemPoolAccept::PreChecks(ATMPArgs& args, Workspace& ws)
555554 CTxMemPool::setEntries& allConflicting = ws.m_all_conflicting ;
556555 CTxMemPool::setEntries& setAncestors = ws.m_ancestors ;
557556 std::unique_ptr<CTxMemPoolEntry>& entry = ws.m_entry ;
558- bool & fReplacementTransaction = ws.m_replacement_transaction ;
559557 CAmount& nModifiedFees = ws.m_modified_fees ;
560558 CAmount& nConflictingFees = ws.m_conflicting_fees ;
561559 size_t & nConflictingSize = ws.m_conflicting_size ;
@@ -778,8 +776,7 @@ bool MemPoolAccept::PreChecks(ATMPArgs& args, Workspace& ws)
778776 }
779777
780778
781- fReplacementTransaction = setConflicts.size ();
782- if (fReplacementTransaction ) {
779+ if (!setConflicts.empty ()) {
783780 CFeeRate newFeeRate (nModifiedFees, nSize);
784781 // It's possible that the replacement pays more fees than its direct conflicts but not more
785782 // than all conflicts (i.e. the direct conflicts have high-fee descendants). However, if the
@@ -884,7 +881,6 @@ bool MemPoolAccept::Finalize(const ATMPArgs& args, Workspace& ws)
884881 const CAmount& nModifiedFees = ws.m_modified_fees ;
885882 const CAmount& nConflictingFees = ws.m_conflicting_fees ;
886883 const size_t & nConflictingSize = ws.m_conflicting_size ;
887- const bool fReplacementTransaction = ws.m_replacement_transaction ;
888884 std::unique_ptr<CTxMemPoolEntry>& entry = ws.m_entry ;
889885
890886 // Remove conflicting transactions from the mempool
@@ -900,11 +896,10 @@ bool MemPoolAccept::Finalize(const ATMPArgs& args, Workspace& ws)
900896 m_pool.RemoveStaged (allConflicting, false , MemPoolRemovalReason::REPLACED);
901897
902898 // This transaction should only count for fee estimation if:
903- // - it isn't a BIP 125 replacement transaction (may not be widely supported)
904899 // - it's not being re-added during a reorg which bypasses typical mempool fee limits
905900 // - the node is not behind
906901 // - the transaction is not dependent on any other transactions in the mempool
907- bool validForFeeEstimation = !fReplacementTransaction && ! bypass_limits && IsCurrentForFeeEstimation (m_active_chainstate) && m_pool.HasNoInputsOf (tx);
902+ bool validForFeeEstimation = !bypass_limits && IsCurrentForFeeEstimation (m_active_chainstate) && m_pool.HasNoInputsOf (tx);
908903
909904 // Store transaction in memory
910905 m_pool.addUnchecked (*entry, setAncestors, validForFeeEstimation);
0 commit comments