Changeset View
Changeset View
Standalone View
Standalone View
src/txmempool.cpp
Show First 20 Lines • Show All 587 Lines • ▼ Show 20 Lines | |||||
* fee estimator. | * fee estimator. | ||||
*/ | */ | ||||
void CTxMemPool::removeForBlock(const std::vector<CTransactionRef> &vtx) { | void CTxMemPool::removeForBlock(const std::vector<CTransactionRef> &vtx) { | ||||
AssertLockHeld(cs); | AssertLockHeld(cs); | ||||
DisconnectedBlockTransactions disconnectpool; | DisconnectedBlockTransactions disconnectpool; | ||||
disconnectpool.addForBlock(vtx, *this); | disconnectpool.addForBlock(vtx, *this); | ||||
std::vector<const CTxMemPoolEntry *> entries; | |||||
for (const CTransactionRef &tx : | |||||
reverse_iterate(disconnectpool.GetQueuedTx().get<insertion_order>())) { | |||||
const TxId &txid = tx->GetId(); | |||||
indexed_transaction_set::iterator i = mapTx.find(txid); | |||||
if (i != mapTx.end()) { | |||||
entries.push_back(&*i); | |||||
} | |||||
} | |||||
for (const CTransactionRef &tx : | for (const CTransactionRef &tx : | ||||
reverse_iterate(disconnectpool.GetQueuedTx().get<insertion_order>())) { | reverse_iterate(disconnectpool.GetQueuedTx().get<insertion_order>())) { | ||||
txiter it = mapTx.find(tx->GetId()); | txiter it = mapTx.find(tx->GetId()); | ||||
if (it != mapTx.end()) { | if (it != mapTx.end()) { | ||||
setEntries stage; | setEntries stage; | ||||
stage.insert(it); | stage.insert(it); | ||||
RemoveStaged(stage, true, MemPoolRemovalReason::BLOCK); | RemoveStaged(stage, true, MemPoolRemovalReason::BLOCK); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 774 Lines • Show Last 20 Lines |