mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-17 08:06:59 +01:00
rpc: Register calls where they are defined
Split out methods to every module, apart from 'help' and 'stop' which
are implemented in rpcserver.cpp itself.
- This makes it easier to add or remove RPC commands - no longer everything that includes
rpcserver.h has to be rebuilt when there's a change there.
- Cleans up `rpc/server.h` by getting rid of the huge cluttered list of function definitions.
- Removes most of the bitcoin-specific code from rpcserver.cpp and .h.
Continues #7307 for the non-wallet.
This commit is contained in:
@@ -24,6 +24,7 @@
|
||||
#include "net.h"
|
||||
#include "policy/policy.h"
|
||||
#include "rpc/server.h"
|
||||
#include "rpc/register.h"
|
||||
#include "script/standard.h"
|
||||
#include "script/sigcache.h"
|
||||
#include "scheduler.h"
|
||||
@@ -913,10 +914,11 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
|
||||
fPruneMode = true;
|
||||
}
|
||||
|
||||
RegisterAllCoreRPCCommands(tableRPC);
|
||||
#ifdef ENABLE_WALLET
|
||||
bool fDisableWallet = GetBoolArg("-disablewallet", false);
|
||||
if (!fDisableWallet)
|
||||
walletRegisterRPCCommands();
|
||||
RegisterWalletRPCCommands(tableRPC);
|
||||
#endif
|
||||
|
||||
nConnectTimeout = GetArg("-timeout", DEFAULT_CONNECT_TIMEOUT);
|
||||
|
||||
Reference in New Issue
Block a user