Skip to content

Commit abbd230

Browse files
committed
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.
1 parent 2f959a5 commit abbd230

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

src/init.cpp

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1033,11 +1033,6 @@ bool AppInitParameterInteraction()
10331033
fPruneMode = true;
10341034
}
10351035

1036-
RegisterAllCoreRPCCommands(tableRPC);
1037-
#ifdef ENABLE_WALLET
1038-
RegisterWalletRPC(tableRPC);
1039-
#endif
1040-
10411036
nConnectTimeout = gArgs.GetArg("-timeout", DEFAULT_CONNECT_TIMEOUT);
10421037
if (nConnectTimeout <= 0)
10431038
nConnectTimeout = DEFAULT_CONNECT_TIMEOUT;
@@ -1241,6 +1236,14 @@ bool AppInitMain(boost::thread_group& threadGroup, CScheduler& scheduler)
12411236

12421237
GetMainSignals().RegisterBackgroundSignalScheduler(scheduler);
12431238

1239+
/* Register RPC commands regardless of -server setting so they will be
1240+
* available in the GUI RPC console even if external calls are disabled.
1241+
*/
1242+
RegisterAllCoreRPCCommands(tableRPC);
1243+
#ifdef ENABLE_WALLET
1244+
RegisterWalletRPC(tableRPC);
1245+
#endif
1246+
12441247
/* Start the RPC server already. It will be started in "warmup" mode
12451248
* and not really process calls already (but it will signify connections
12461249
* that the server is there and will be ready later). Warmup mode will

0 commit comments

Comments
 (0)