aboutsummaryrefslogtreecommitdiff
path: root/src/validationinterface.h
diff options
context:
space:
mode:
authorMatt Corallo <git@bluematt.me>2017-01-19 16:49:22 -0500
committerMatt Corallo <git@bluematt.me>2017-07-07 11:33:18 -0400
commitcda1429d5bfee129a0d1f6f1c65962b30251bafb (patch)
tree5625a6b2d9e5fd5cfe23c453ebbd6e1f34f362a9 /src/validationinterface.h
parent3a19fed9db558a5f666d965b6f602f7faf74ab73 (diff)
Give CMainSignals a reference to the global scheduler
...so that it can run some signals in the background later
Diffstat (limited to 'src/validationinterface.h')
-rw-r--r--src/validationinterface.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/validationinterface.h b/src/validationinterface.h
index c248781a48..8cae3c6db4 100644
--- a/src/validationinterface.h
+++ b/src/validationinterface.h
@@ -19,6 +19,7 @@ class CReserveScript;
class CValidationInterface;
class CValidationState;
class uint256;
+class CScheduler;
// These functions dispatch to one or all registered wallets
@@ -72,9 +73,15 @@ private:
friend void ::RegisterValidationInterface(CValidationInterface*);
friend void ::UnregisterValidationInterface(CValidationInterface*);
friend void ::UnregisterAllValidationInterfaces();
+
public:
CMainSignals();
+ /** Register a CScheduler to give callbacks which should run in the background (may only be called once) */
+ void RegisterBackgroundSignalScheduler(CScheduler& scheduler);
+ /** Unregister a CScheduler to give callbacks which should run in the background - these callbacks will now be dropped! */
+ void UnregisterBackgroundSignalScheduler();
+
void UpdatedBlockTip(const CBlockIndex *, const CBlockIndex *, bool fInitialDownload);
void TransactionAddedToMempool(const CTransactionRef &);
void BlockConnected(const std::shared_ptr<const CBlock> &, const CBlockIndex *pindex, const std::vector<CTransactionRef> &);