Skip to content

Commit c30fa16

Browse files
committed
CTxMemPool::removeForBlock now uses RemoveStaged
Coming from btc@7659438a63ef162b4a4f942f86683ae6785f8162
1 parent ba73898 commit c30fa16

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
@@ -603,8 +603,12 @@ void CTxMemPool::removeForBlock(const std::vector<CTransactionRef>& vtx, unsigne
603603
entries.push_back(*i);
604604
}
605605
for (const auto& tx : vtx) {
606-
std::list<CTransactionRef> dummy;
607-
remove(*tx, dummy, false);
606+
txiter it = mapTx.find(tx->GetHash());
607+
if (it != mapTx.end()) {
608+
setEntries stage;
609+
stage.insert(it);
610+
RemoveStaged(stage);
611+
}
608612
removeConflicts(*tx, conflicts);
609613
ClearPrioritisation(tx->GetHash());
610614
}

0 commit comments

Comments
 (0)