Skip to content

Commit 7659438

Browse files
committed
CTxMemPool::removeForBlock now uses RemoveStaged
1 parent 0735c0c commit 7659438

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/txmempool.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -564,8 +564,12 @@ void CTxMemPool::removeForBlock(const std::vector<CTransaction>& vtx, unsigned i
564564
}
565565
BOOST_FOREACH(const CTransaction& tx, vtx)
566566
{
567-
std::list<CTransaction> dummy;
568-
remove(tx, dummy, false);
567+
txiter it = mapTx.find(tx.GetHash());
568+
if (it != mapTx.end()) {
569+
setEntries stage;
570+
stage.insert(it);
571+
RemoveStaged(stage);
572+
}
569573
removeConflicts(tx, conflicts);
570574
ClearPrioritisation(tx.GetHash());
571575
}

0 commit comments

Comments
 (0)