2626#include " guiinterface.h"
2727#include " init.h"
2828#include " invalid.h"
29+ #include " interfaces/handler.h"
2930#include " legacy/validation_zerocoin_legacy.h"
30- #include " libzerocoin/Denominations.h"
3131#include " kernel.h"
3232#include " masternode-payments.h"
3333#include " masternode-sync.h"
@@ -186,10 +186,11 @@ class MemPoolConflictRemovalTracker
186186private:
187187 std::vector<CTransactionRef> conflictedTxs;
188188 CTxMemPool &pool;
189+ std::unique_ptr<interfaces::Handler> m_handler_notify_entry_removed;
189190
190191public:
191192 MemPoolConflictRemovalTracker (CTxMemPool &_pool) : pool(_pool) {
192- pool.NotifyEntryRemoved .connect (std::bind (&MemPoolConflictRemovalTracker::NotifyEntryRemoved, this , std::placeholders::_1, std::placeholders::_2));
193+ m_handler_notify_entry_removed = interfaces::MakeHandler ( pool.NotifyEntryRemoved .connect (std::bind (&MemPoolConflictRemovalTracker::NotifyEntryRemoved, this , std::placeholders::_1, std::placeholders::_2) ));
193194 }
194195
195196 void NotifyEntryRemoved (CTransactionRef txRemoved, MemPoolRemovalReason reason) {
@@ -199,7 +200,7 @@ class MemPoolConflictRemovalTracker
199200 }
200201
201202 ~MemPoolConflictRemovalTracker () {
202- pool. NotifyEntryRemoved . disconnect (std::bind (&MemPoolConflictRemovalTracker::NotifyEntryRemoved, this , std::placeholders::_1, std::placeholders::_2) );
203+ m_handler_notify_entry_removed-> disconnect ();
203204 for (const auto & tx : conflictedTxs) {
204205 GetMainSignals ().SyncTransaction (*tx, nullptr , CMainSignals::SYNC_TRANSACTION_NOT_IN_BLOCK);
205206 }
0 commit comments