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

@@ -112,8 +112,8 @@ static bool AppInit(NodeContext& node, int argc, char* argv[])
util::ThreadSetInternalName("init");
// If Qt is used, parameters/bitcoin.conf are parsed in qt/bitcoin.cpp's main()
SetupServerArgs(node);
ArgsManager& args = *Assert(node.args);
SetupServerArgs(args);
std::string error;
if (!args.ParseParameters(argc, argv, error)) {
return InitError(Untranslated(strprintf("Error parsing command line arguments: %s\n", error)));