diff options
author | Russell Yanofsky <russ@yanofsky.org> | 2017-11-03 16:28:18 -0400 |
---|---|---|
committer | Russell Yanofsky <russ@yanofsky.org> | 2017-11-03 16:28:18 -0400 |
commit | abbd230217df2f3b0cc25527f3c15f6f11b9852e (patch) | |
tree | 4a8d1a334ea6bcd5097aa887cb730baefab9826a /src | |
parent | 2f959a58744d42859d74579220922e25ac3d2925 (diff) | |
download | bitcoin-abbd230217df2f3b0cc25527f3c15f6f11b9852e.tar.xz |
Move RPC registration out of AppInitParameterInteraction
Move to AppInitServers. This doesn't have any effects on bitcoin behavior. It
was just strange to have this unrelated code in the middle or parameter
interaction.
Diffstat (limited to 'src')
-rw-r--r-- | src/init.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/init.cpp b/src/init.cpp index e57ea0f436..7fdde65aa7 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -1033,11 +1033,6 @@ bool AppInitParameterInteraction() fPruneMode = true; } - RegisterAllCoreRPCCommands(tableRPC); -#ifdef ENABLE_WALLET - RegisterWalletRPC(tableRPC); -#endif - nConnectTimeout = gArgs.GetArg("-timeout", DEFAULT_CONNECT_TIMEOUT); if (nConnectTimeout <= 0) nConnectTimeout = DEFAULT_CONNECT_TIMEOUT; @@ -1241,6 +1236,14 @@ bool AppInitMain(boost::thread_group& threadGroup, CScheduler& scheduler) GetMainSignals().RegisterBackgroundSignalScheduler(scheduler); + /* Register RPC commands regardless of -server setting so they will be + * available in the GUI RPC console even if external calls are disabled. + */ + RegisterAllCoreRPCCommands(tableRPC); +#ifdef ENABLE_WALLET + RegisterWalletRPC(tableRPC); +#endif + /* 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 |