aboutsummaryrefslogtreecommitdiff
path: root/src/init.cpp
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/init.cpp
parent3a19fed9db558a5f666d965b6f602f7faf74ab73 (diff)
downloadbitcoin-cda1429d5bfee129a0d1f6f1c65962b30251bafb.tar.xz
Give CMainSignals a reference to the global scheduler
...so that it can run some signals in the background later
Diffstat (limited to 'src/init.cpp')
-rw-r--r--src/init.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/init.cpp b/src/init.cpp
index 672ef77e80..94bba6820e 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -251,6 +251,7 @@ void Shutdown()
}
#endif
UnregisterAllValidationInterfaces();
+ GetMainSignals().UnregisterBackgroundSignalScheduler();
#ifdef ENABLE_WALLET
for (CWalletRef pwallet : vpwallets) {
delete pwallet;
@@ -1203,6 +1204,8 @@ bool AppInitMain(boost::thread_group& threadGroup, CScheduler& scheduler)
CScheduler::Function serviceLoop = boost::bind(&CScheduler::serviceQueue, &scheduler);
threadGroup.create_thread(boost::bind(&TraceThread<CScheduler::Function>, "scheduler", serviceLoop));
+ GetMainSignals().RegisterBackgroundSignalScheduler(scheduler);
+
/* Start the RPC server already. It will be started in "warmup" mode
* and not really process calls already (but it will signify connections
* that the server is there and will be ready later). Warmup mode will