@@ -606,6 +606,7 @@ void CTxMemPool::removeRecursive(const CTransaction &origTx, MemPoolRemovalReaso
606606{
607607 // Remove transaction from memory pool
608608 AssertLockHeld (cs);
609+ Assume (!m_have_changeset);
609610 setEntries txToRemove;
610611 txiter origit = mapTx.find (origTx.GetHash ());
611612 if (origit != mapTx.end ()) {
@@ -637,6 +638,7 @@ void CTxMemPool::removeForReorg(CChain& chain, std::function<bool(txiter)> check
637638 // Remove transactions spending a coinbase which are now immature and no-longer-final transactions
638639 AssertLockHeld (cs);
639640 AssertLockHeld (::cs_main);
641+ Assume (!m_have_changeset);
640642
641643 setEntries txToRemove;
642644 for (indexed_transaction_set::const_iterator it = mapTx.begin (); it != mapTx.end (); it++) {
@@ -675,6 +677,7 @@ void CTxMemPool::removeConflicts(const CTransaction &tx)
675677void CTxMemPool::removeForBlock (const std::vector<CTransactionRef>& vtx, unsigned int nBlockHeight)
676678{
677679 AssertLockHeld (cs);
680+ Assume (!m_have_changeset);
678681 std::vector<RemovedMempoolTransactionInfo> txs_removed_for_block;
679682 txs_removed_for_block.reserve (vtx.size ());
680683 for (const auto & tx : vtx)
@@ -1093,6 +1096,7 @@ void CTxMemPool::RemoveStaged(setEntries &stage, bool updateDescendants, MemPool
10931096int CTxMemPool::Expire (std::chrono::seconds time)
10941097{
10951098 AssertLockHeld (cs);
1099+ Assume (!m_have_changeset);
10961100 indexed_transaction_set::index<entry_time>::type::iterator it = mapTx.get <entry_time>().begin ();
10971101 setEntries toremove;
10981102 while (it != mapTx.get <entry_time>().end () && it->GetTime () < time) {
@@ -1163,6 +1167,7 @@ void CTxMemPool::trackPackageRemoved(const CFeeRate& rate) {
11631167
11641168void CTxMemPool::TrimToSize (size_t sizelimit, std::vector<COutPoint>* pvNoSpendsRemaining) {
11651169 AssertLockHeld (cs);
1170+ Assume (!m_have_changeset);
11661171
11671172 unsigned nTxnRemoved = 0 ;
11681173 CFeeRate maxFeeRateRemoved (0 );
0 commit comments