File tree Expand file tree Collapse file tree 5 files changed +17
-4
lines changed Expand file tree Collapse file tree 5 files changed +17
-4
lines changed Original file line number Diff line number Diff line change @@ -1017,7 +1017,7 @@ bool AppInitParameterInteraction()
1017
1017
1018
1018
RegisterAllCoreRPCCommands (tableRPC);
1019
1019
#ifdef ENABLE_WALLET
1020
- RegisterWalletRPCCommands (tableRPC);
1020
+ RegisterWalletRPC (tableRPC);
1021
1021
#endif
1022
1022
1023
1023
nConnectTimeout = gArgs .GetArg (" -timeout" , DEFAULT_CONNECT_TIMEOUT);
Original file line number Diff line number Diff line change 10
10
#include " utilmoneystr.h"
11
11
#include " validation.h"
12
12
#include " wallet/wallet.h"
13
+ #include " wallet/rpcwallet.h"
13
14
14
15
std::string GetWalletHelpString (bool showDebug)
15
16
{
@@ -171,6 +172,13 @@ bool WalletParameterInteraction()
171
172
return true ;
172
173
}
173
174
175
+ void RegisterWalletRPC (CRPCTable &t)
176
+ {
177
+ if (gArgs .GetBoolArg (" -disablewallet" , false )) return ;
178
+
179
+ RegisterWalletRPCCommands (t);
180
+ }
181
+
174
182
bool VerifyWallets ()
175
183
{
176
184
if (gArgs .GetBoolArg (" -disablewallet" , DEFAULT_DISABLE_WALLET))
Original file line number Diff line number Diff line change 8
8
9
9
#include < string>
10
10
11
+ class CRPCTable ;
12
+
11
13
// ! Return the wallets help message.
12
14
std::string GetWalletHelpString (bool showDebug);
13
15
14
16
// ! Wallets parameter interaction
15
17
bool WalletParameterInteraction ();
16
18
19
+ // ! Register wallet RPCs.
20
+ void RegisterWalletRPC (CRPCTable &tableRPC);
21
+
17
22
// ! Responsible for reading and validating the -wallet arguments and verifying the wallet database.
18
23
// This function will perform salvage on the wallet if requested, as long as only one wallet is
19
24
// being loaded (CWallet::ParameterInteraction forbids -salvagewallet, -zapwallettxes or -upgradewallet with multiwallet).
Original file line number Diff line number Diff line change @@ -3217,9 +3217,6 @@ static const CRPCCommand commands[] =
3217
3217
3218
3218
void RegisterWalletRPCCommands (CRPCTable &t)
3219
3219
{
3220
- if (gArgs .GetBoolArg (" -disablewallet" , false ))
3221
- return ;
3222
-
3223
3220
for (unsigned int vcidx = 0 ; vcidx < ARRAYLEN (commands); vcidx++)
3224
3221
t.appendCommand (commands[vcidx].name , &commands[vcidx]);
3225
3222
}
Original file line number Diff line number Diff line change 5
5
#ifndef BITCOIN_WALLET_RPCWALLET_H
6
6
#define BITCOIN_WALLET_RPCWALLET_H
7
7
8
+ #include < string>
9
+
8
10
class CRPCTable ;
11
+ class CWallet ;
9
12
class JSONRPCRequest ;
10
13
11
14
void RegisterWalletRPCCommands (CRPCTable &t);
You can’t perform that action at this time.
0 commit comments