mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-20 15:19:07 +01:00
Fire TransactionRemovedFromMempool from mempool
This commit fires TransactionRemovedFromMempool callbacks from the mempool and cleans up a bunch of code.
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
#include <util/system.h>
|
||||
#include <util/moneystr.h>
|
||||
#include <util/time.h>
|
||||
#include <validationinterface.h>
|
||||
|
||||
CTxMemPoolEntry::CTxMemPoolEntry(const CTransactionRef& _tx, const CAmount& _nFee,
|
||||
int64_t _nTime, unsigned int _entryHeight,
|
||||
@@ -403,7 +404,12 @@ void CTxMemPool::addUnchecked(const CTxMemPoolEntry &entry, setEntries &setAnces
|
||||
|
||||
void CTxMemPool::removeUnchecked(txiter it, MemPoolRemovalReason reason)
|
||||
{
|
||||
NotifyEntryRemoved(it->GetSharedTx(), reason);
|
||||
CTransactionRef ptx = it->GetSharedTx();
|
||||
NotifyEntryRemoved(ptx, reason);
|
||||
if (reason != MemPoolRemovalReason::BLOCK && reason != MemPoolRemovalReason::CONFLICT) {
|
||||
GetMainSignals().TransactionRemovedFromMempool(ptx);
|
||||
}
|
||||
|
||||
const uint256 hash = it->GetTx().GetHash();
|
||||
for (const CTxIn& txin : it->GetTx().vin)
|
||||
mapNextTx.erase(txin.prevout);
|
||||
|
||||
Reference in New Issue
Block a user