Skip to content

Commit a933cb1

Browse files
committed
Merge #11603: Move RPC registration out of AppInitParameterInteraction
abbd230 Move RPC registration out of AppInitParameterInteraction (Russell Yanofsky) Pull request description: Move to AppInitServers. This doesn't have any effects on bitcoin behavior. It was just strange to have this unrelated code in the middle of parameter interaction. Tree-SHA512: 373e18f2ef8d21999ad36295d69326128a3086044acfc8ed537abd5497c8d3620b9832f7f6aa87c0c0939bb5e0d92be8a3c006b5997e9e6fa20334f5610c89bc
2 parents 84fa645 + abbd230 commit a933cb1

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
@@ -1030,11 +1030,6 @@ bool AppInitParameterInteraction()
10301030
fPruneMode = true;
10311031
}
10321032

1033-
RegisterAllCoreRPCCommands(tableRPC);
1034-
#ifdef ENABLE_WALLET
1035-
RegisterWalletRPC(tableRPC);
1036-
#endif
1037-
10381033
nConnectTimeout = gArgs.GetArg("-timeout", DEFAULT_CONNECT_TIMEOUT);
10391034
if (nConnectTimeout <= 0)
10401035
nConnectTimeout = DEFAULT_CONNECT_TIMEOUT;
@@ -1239,6 +1234,14 @@ bool AppInitMain(boost::thread_group& threadGroup, CScheduler& scheduler)
12391234
GetMainSignals().RegisterBackgroundSignalScheduler(scheduler);
12401235
GetMainSignals().RegisterWithMempoolSignals(mempool);
12411236

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

0 commit comments

Comments
 (0)