Changeset View
Changeset View
Standalone View
Standalone View
src/txmempool.cpp
Show First 20 Lines • Show All 461 Lines • ▼ Show 20 Lines | void CTxMemPool::addUnchecked(const CTxMemPoolEntry &entry, | ||||
vTxHashes.emplace_back(tx.GetHash(), newit); | vTxHashes.emplace_back(tx.GetHash(), newit); | ||||
newit->vTxHashesIdx = vTxHashes.size() - 1; | newit->vTxHashesIdx = vTxHashes.size() - 1; | ||||
} | } | ||||
void CTxMemPool::removeUnchecked(txiter it, MemPoolRemovalReason reason) { | void CTxMemPool::removeUnchecked(txiter it, MemPoolRemovalReason reason) { | ||||
CTransactionRef ptx = it->GetSharedTx(); | CTransactionRef ptx = it->GetSharedTx(); | ||||
NotifyEntryRemoved(ptx, reason); | NotifyEntryRemoved(ptx, reason); | ||||
if (reason != MemPoolRemovalReason::BLOCK && | if (reason != MemPoolRemovalReason::BLOCK) { | ||||
reason != MemPoolRemovalReason::CONFLICT) { | // Notify clients that a transaction has been removed from the mempool | ||||
// for any reason except being included in a block. Clients interested | |||||
// in transactions included in blocks can subscribe to the | |||||
// BlockConnected notification. | |||||
GetMainSignals().TransactionRemovedFromMempool(ptx); | GetMainSignals().TransactionRemovedFromMempool(ptx); | ||||
} | } | ||||
NotifyEntryRemoved(it->GetSharedTx(), reason); | NotifyEntryRemoved(it->GetSharedTx(), reason); | ||||
for (const CTxIn &txin : it->GetTx().vin) { | for (const CTxIn &txin : it->GetTx().vin) { | ||||
mapNextTx.erase(txin.prevout); | mapNextTx.erase(txin.prevout); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 966 Lines • Show Last 20 Lines |