Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/rpcdump.cpp
Show First 20 Lines • Show All 1,464 Lines • ▼ Show 20 Lines | static const ContextFreeRPCCommand commands[] = { | ||||
{ "wallet", "importaddress", importaddress, {"address","label","rescan","p2sh"} }, | { "wallet", "importaddress", importaddress, {"address","label","rescan","p2sh"} }, | ||||
{ "wallet", "importprunedfunds", importprunedfunds, {"rawtransaction","txoutproof"} }, | { "wallet", "importprunedfunds", importprunedfunds, {"rawtransaction","txoutproof"} }, | ||||
{ "wallet", "importpubkey", importpubkey, {"pubkey","label","rescan"} }, | { "wallet", "importpubkey", importpubkey, {"pubkey","label","rescan"} }, | ||||
{ "wallet", "removeprunedfunds", removeprunedfunds, {"txid"} }, | { "wallet", "removeprunedfunds", removeprunedfunds, {"txid"} }, | ||||
}; | }; | ||||
// clang-format on | // clang-format on | ||||
void RegisterDumpRPCCommands(CRPCTable &t) { | void RegisterDumpRPCCommands(CRPCTable &t) { | ||||
if (gArgs.GetBoolArg("-disablewallet", false)) { | |||||
Fabien: My understanding is that `-disablewallet` can be set even if `ENABLE_WALLET` is set (and wallet… | |||||
deadalnixAuthorUnsubmitted Done Inline ActionsThe check is performed in WalletInit::RegisterRPC . This follow the pattern in D2181 . It's not the responsibility of the function that register command to check for user level configurations. deadalnix: The check is performed in `WalletInit::RegisterRPC` .
This follow the pattern in D2181 . It's… | |||||
return; | |||||
} | |||||
for (unsigned int vcidx = 0; vcidx < ARRAYLEN(commands); vcidx++) { | for (unsigned int vcidx = 0; vcidx < ARRAYLEN(commands); vcidx++) { | ||||
t.appendCommand(commands[vcidx].name, &commands[vcidx]); | t.appendCommand(commands[vcidx].name, &commands[vcidx]); | ||||
} | } | ||||
} | } |
My understanding is that -disablewallet can be set even if ENABLE_WALLET is set (and wallet is compiled).
I would keep that one to avoid issues.
Note: there seems to be a DEFAULT_DISABLE_WALLET which can be used instead of false (for another diff).