mapDeltas maintains a map of transaction hashes to pairs of prioritization deltas. As transactions are removed from the mempool, mapDeltas needs to also have these transactions removed. ClearPrioritization is called in CTxMemPool::removeForBlock to accomplish this, but there are other ways that transactions are removed from the mempool. CTxMemPool::removeConflicts and DisconnectTip in main.cpp both call CTxMemPool::remove which is where transactions are erased from mapTx. Perhaps if ClearPrioritization were moved to CTxMemPool::remove that would be sufficient, but it might be better to store the deltas in the CTxMemPoolEntry’s themselves so we don’t have to worry about keeping anything in sync. This would have the downside of storing this extra information for all transactions and not just the few that actually have prioritization deltas. @luke-jr , maybe you want to have a look?