Give CMainSignals a reference to the global scheduler

...so that it can run some signals in the background later
This commit is contained in:
Matt Corallo
2017-01-19 16:49:22 -05:00
parent 3a19fed9db
commit cda1429d5b
5 changed files with 32 additions and 0 deletions

View File

@@ -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> &);