aboutsummaryrefslogtreecommitdiff
path: root/src/init.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2014-11-04 16:14:50 +0100
committerWladimir J. van der Laan <laanwj@gmail.com>2014-11-04 16:18:15 +0100
commit06037f3f46463e65ab74e0f34ba5f7a869d053fd (patch)
tree398bb1aa204787adab42b54dc5ccfe982d5c6419 /src/init.cpp
parent70d80cc7bf89211a5aa157cb624fff3b7097c48e (diff)
parentaf82884ab7c485c8b4c5ac93c308127c39c196be (diff)
downloadbitcoin-06037f3f46463e65ab74e0f34ba5f7a869d053fd.tar.xz
Merge pull request #5007
af82884 Add "warmup mode" for RPC server. (Daniel Kraft)
Diffstat (limited to 'src/init.cpp')
-rw-r--r--src/init.cpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/init.cpp b/src/init.cpp
index d622af69ef..fe58c68fda 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -752,6 +752,17 @@ bool AppInit2(boost::thread_group& threadGroup)
threadGroup.create_thread(&ThreadScriptCheck);
}
+ /* 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
+ * be disabled when initialisation is finished.
+ */
+ if (fServer)
+ {
+ uiInterface.InitMessage.connect(SetRPCWarmupStatus);
+ StartRPCThreads();
+ }
+
int64_t nStart;
// ********************************************************* Step 5: verify wallet database integrity
@@ -1248,8 +1259,6 @@ bool AppInit2(boost::thread_group& threadGroup)
#endif
StartNode(threadGroup);
- if (fServer)
- StartRPCThreads();
#ifdef ENABLE_WALLET
// Generate coins in the background
@@ -1259,6 +1268,7 @@ bool AppInit2(boost::thread_group& threadGroup)
// ********************************************************* Step 11: finished
+ SetRPCWarmupFinished();
uiInterface.InitMessage(_("Done loading"));
#ifdef ENABLE_WALLET