@@ -470,6 +470,8 @@ class MemPoolAccept
470
470
*/
471
471
std::vector<COutPoint>& m_coins_to_uncache;
472
472
const bool m_test_accept;
473
+ /* * Disable BIP125 RBFing; disallow all conflicts with mempool transactions. */
474
+ const bool disallow_mempool_conflicts;
473
475
};
474
476
475
477
// Single transaction acceptance
@@ -631,7 +633,7 @@ bool MemPoolAccept::PreChecks(ATMPArgs& args, Workspace& ws)
631
633
break ;
632
634
}
633
635
}
634
- if (fReplacementOptOut ) {
636
+ if (fReplacementOptOut || args. disallow_mempool_conflicts ) {
635
637
return state.Invalid (TxValidationResult::TX_MEMPOOL_POLICY, " txn-mempool-conflict" );
636
638
}
637
639
@@ -1072,7 +1074,8 @@ static MempoolAcceptResult AcceptToMemoryPoolWithTime(const CChainParams& chainp
1072
1074
EXCLUSIVE_LOCKS_REQUIRED(cs_main)
1073
1075
{
1074
1076
std::vector<COutPoint> coins_to_uncache;
1075
- MemPoolAccept::ATMPArgs args { chainparams, nAcceptTime, bypass_limits, coins_to_uncache, test_accept };
1077
+ MemPoolAccept::ATMPArgs args { chainparams, nAcceptTime, bypass_limits, coins_to_uncache,
1078
+ test_accept, /* disallow_mempool_conflicts */ false };
1076
1079
1077
1080
assert (std::addressof (::ChainstateActive ()) == std::addressof (active_chainstate));
1078
1081
const MempoolAcceptResult result = MemPoolAccept (pool, active_chainstate).AcceptSingleTransaction (tx, args);
0 commit comments