aboutsummaryrefslogtreecommitdiff
path: root/src/txmempool.cpp
diff options
context:
space:
mode:
authorJohn Newbery <john@johnnewbery.com>2019-11-11 10:53:03 -0500
committerJohn Newbery <john@johnnewbery.com>2020-03-11 18:38:33 -0400
commite57980b4738c10344baf136de3e050a3cb958ca5 (patch)
tree82c05099fba7de2fb55d62147612b2ca6ddcb3c1 /src/txmempool.cpp
parent2dd561f36124972d2364f941de9c3417c65f05b6 (diff)
[mempool] Remove NotifyEntryAdded and NotifyEntryRemoved callbacks
NotifyEntryAdded never had any subscribers so can be removed. Since ConnectTrace no longer subscribes to NotifyEntryRemoved, there are now no subscribers. The CValidationInterface TransactionAddedToMempool and TransactionRemovedFromMempool methods can now provide this functionality. There's no need for a special notifications framework for the mempool.
Diffstat (limited to 'src/txmempool.cpp')
-rw-r--r--src/txmempool.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/txmempool.cpp b/src/txmempool.cpp
index f04f13e6e0..47b0d39ea4 100644
--- a/src/txmempool.cpp
+++ b/src/txmempool.cpp
@@ -355,7 +355,6 @@ void CTxMemPool::AddTransactionsUpdated(unsigned int n)
void CTxMemPool::addUnchecked(const CTxMemPoolEntry &entry, setEntries &setAncestors, bool validFeeEstimate)
{
- NotifyEntryAdded(entry.GetSharedTx());
// Add to memory pool without checking anything.
// Used by AcceptToMemoryPool(), which DOES do
// all the appropriate checks.
@@ -406,14 +405,12 @@ void CTxMemPool::addUnchecked(const CTxMemPoolEntry &entry, setEntries &setAnces
void CTxMemPool::removeUnchecked(txiter it, MemPoolRemovalReason reason)
{
- CTransactionRef ptx = it->GetSharedTx();
- NotifyEntryRemoved(ptx, reason);
if (reason != MemPoolRemovalReason::BLOCK) {
// 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(it->GetSharedTx());
}
const uint256 hash = it->GetTx().GetHash();