diff --git a/src/txmempool.cpp b/src/txmempool.cpp index b8be3e080e7..27b4c886093 100644 --- a/src/txmempool.cpp +++ b/src/txmempool.cpp @@ -221,7 +221,9 @@ void CTxMemPool::Apply(ChangeSet* changeset) addNewTransaction(it); } - m_txgraph->DoWork(POST_CHANGE_WORK); + if (!m_txgraph->DoWork(POST_CHANGE_WORK)) { + LogDebug(BCLog::MEMPOOL, "Mempool in non-optimal ordering after addition(s)."); + } } void CTxMemPool::addNewTransaction(CTxMemPool::txiter newit) @@ -378,7 +380,9 @@ void CTxMemPool::removeForReorg(CChain& chain, std::function check for (indexed_transaction_set::const_iterator it = mapTx.begin(); it != mapTx.end(); it++) { assert(TestLockPointValidity(chain, it->GetLockPoints())); } - m_txgraph->DoWork(POST_CHANGE_WORK); + if (!m_txgraph->DoWork(POST_CHANGE_WORK)) { + LogDebug(BCLog::MEMPOOL, "Mempool in non-optimal ordering after reorg."); + } } void CTxMemPool::removeConflicts(const CTransaction &tx) @@ -421,7 +425,9 @@ void CTxMemPool::removeForBlock(const std::vector& vtx, unsigne } lastRollingFeeUpdate = GetTime(); blockSinceLastRollingFeeBump = true; - m_txgraph->DoWork(POST_CHANGE_WORK); + if (!m_txgraph->DoWork(POST_CHANGE_WORK)) { + LogDebug(BCLog::MEMPOOL, "Mempool in non-optimal ordering after block."); + } } void CTxMemPool::check(const CCoinsViewCache& active_coins_tip, int64_t spendheight) const