@@ -473,7 +473,6 @@ class MemPoolAccept
473
473
std::unique_ptr<CTxMemPoolEntry> m_entry;
474
474
std::list<CTransactionRef> m_replaced_transactions;
475
475
476
- bool m_replacement_transaction;
477
476
CAmount m_base_fees;
478
477
CAmount m_modified_fees;
479
478
/* * Total modified fees of all transactions being replaced. */
@@ -555,7 +554,6 @@ bool MemPoolAccept::PreChecks(ATMPArgs& args, Workspace& ws)
555
554
CTxMemPool::setEntries& allConflicting = ws.m_all_conflicting ;
556
555
CTxMemPool::setEntries& setAncestors = ws.m_ancestors ;
557
556
std::unique_ptr<CTxMemPoolEntry>& entry = ws.m_entry ;
558
- bool & fReplacementTransaction = ws.m_replacement_transaction ;
559
557
CAmount& nModifiedFees = ws.m_modified_fees ;
560
558
CAmount& nConflictingFees = ws.m_conflicting_fees ;
561
559
size_t & nConflictingSize = ws.m_conflicting_size ;
@@ -778,8 +776,7 @@ bool MemPoolAccept::PreChecks(ATMPArgs& args, Workspace& ws)
778
776
}
779
777
780
778
781
- fReplacementTransaction = setConflicts.size ();
782
- if (fReplacementTransaction ) {
779
+ if (!setConflicts.empty ()) {
783
780
CFeeRate newFeeRate (nModifiedFees, nSize);
784
781
// It's possible that the replacement pays more fees than its direct conflicts but not more
785
782
// 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)
884
881
const CAmount& nModifiedFees = ws.m_modified_fees ;
885
882
const CAmount& nConflictingFees = ws.m_conflicting_fees ;
886
883
const size_t & nConflictingSize = ws.m_conflicting_size ;
887
- const bool fReplacementTransaction = ws.m_replacement_transaction ;
888
884
std::unique_ptr<CTxMemPoolEntry>& entry = ws.m_entry ;
889
885
890
886
// Remove conflicting transactions from the mempool
@@ -900,11 +896,10 @@ bool MemPoolAccept::Finalize(const ATMPArgs& args, Workspace& ws)
900
896
m_pool.RemoveStaged (allConflicting, false , MemPoolRemovalReason::REPLACED);
901
897
902
898
// This transaction should only count for fee estimation if:
903
- // - it isn't a BIP 125 replacement transaction (may not be widely supported)
904
899
// - it's not being re-added during a reorg which bypasses typical mempool fee limits
905
900
// - the node is not behind
906
901
// - 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);
908
903
909
904
// Store transaction in memory
910
905
m_pool.addUnchecked (*entry, setAncestors, validForFeeEstimation);
0 commit comments