66
77#include " validationinterface.h"
88#include " scheduler.h"
9- #include " txmempool.h"
109#include " validation.h"
1110
1211#include < future>
@@ -79,14 +78,6 @@ size_t CMainSignals::CallbacksPending() {
7978 return m_internals->m_schedulerClient .CallbacksPending ();
8079}
8180
82- void CMainSignals::RegisterWithMempoolSignals (CTxMemPool& pool) {
83- pool.NotifyEntryRemoved .connect (std::bind (&CMainSignals::MempoolEntryRemoved, this , std::placeholders::_1, std::placeholders::_2));
84- }
85-
86- void CMainSignals::UnregisterWithMempoolSignals (CTxMemPool& pool) {
87- pool.NotifyEntryRemoved .disconnect_all_slots ();
88- }
89-
9081CMainSignals& GetMainSignals ()
9182{
9283 return g_signals;
@@ -137,14 +128,6 @@ void SyncWithValidationInterfaceQueue() {
137128 promise.get_future ().wait ();
138129}
139130
140- void CMainSignals::MempoolEntryRemoved (CTransactionRef ptx, MemPoolRemovalReason reason) {
141- if (reason != MemPoolRemovalReason::BLOCK && reason != MemPoolRemovalReason::CONFLICT) {
142- m_internals->m_schedulerClient .AddToProcessQueue ([ptx, this ] {
143- m_internals->TransactionRemovedFromMempool (ptx);
144- });
145- }
146- }
147-
148131void CMainSignals::UpdatedBlockTip (const CBlockIndex* pindexNew, const CBlockIndex* pindexFork, bool fInitialDownload ) {
149132 // Dependencies exist that require UpdatedBlockTip events to be delivered in the order in which
150133 // the chain actually updates. One way to ensure this is for the caller to invoke this signal
@@ -161,6 +144,12 @@ void CMainSignals::TransactionAddedToMempool(const CTransactionRef &ptx) {
161144 });
162145}
163146
147+ void CMainSignals::TransactionRemovedFromMempool (const CTransactionRef& ptx) {
148+ m_internals->m_schedulerClient .AddToProcessQueue ([ptx, this ] {
149+ m_internals->TransactionRemovedFromMempool (ptx);
150+ });
151+ }
152+
164153void CMainSignals::BlockConnected (const std::shared_ptr<const CBlock> &pblock, const CBlockIndex *pindex, const std::shared_ptr<const std::vector<CTransactionRef>>& pvtxConflicted) {
165154 m_internals->m_schedulerClient .AddToProcessQueue ([pblock, pindex, pvtxConflicted, this ] {
166155 m_internals->BlockConnected (pblock, pindex, *pvtxConflicted);
0 commit comments