Make SetupServerArgs callable without NodeContext

bitcoin-gui code needs to call SetupServerArgs but will not have a
NodeContext object if it is communicating with an external bitcoin-node
process.
This commit is contained in:
Russell Yanofsky
2017-12-05 15:57:12 -05:00
parent 1704bbf226
commit 493fb47c57
7 changed files with 10 additions and 9 deletions

View File

@@ -347,12 +347,8 @@ static void OnRPCStopped()
LogPrint(BCLog::RPC, "RPC stopped.\n");
}
void SetupServerArgs(NodeContext& node)
void SetupServerArgs(ArgsManager& argsman)
{
assert(!node.args);
node.args = &gArgs;
ArgsManager& argsman = *node.args;
SetupHelpOptions(argsman);
argsman.AddArg("-help-debug", "Print help message with debugging options and exit", ArgsManager::ALLOW_ANY, OptionsCategory::DEBUG_TEST); // server-only for now