diff options
author | Russell Yanofsky <russ@yanofsky.org> | 2018-08-23 13:42:31 -0400 |
---|---|---|
committer | Russell Yanofsky <russ@yanofsky.org> | 2020-08-26 05:52:31 -0400 |
commit | e1336316250ab5cb0ed654b1e593378a6e0769ce (patch) | |
tree | 0c8c89dc5e462c8aae6d9b000cb3df159aaf48f5 /src/interfaces/node.cpp | |
parent | a12d9e5fd24a25bef476c10620317e43a5905754 (diff) |
gui: Partially revert #10244 gArgs and Params changes
Change gui code to use gArgs, Params() functions directly instead of going
through interfaces::Node.
Remotely accessing bitcoin-node ArgsManager from bitcoin-gui works fine in
https://github.com/bitcoin/bitcoin/pull/10102, when bitcoin-gui spawns a new
bitcoin-node process and controls its startup, but for bitcoin-gui to support
-ipcconnect option in https://github.com/bitcoin/bitcoin/pull/19461 and connect
to an existing bitcoin-node process, it needs ability to parse arguments itself
before connecting out.
This change also simplifies https://github.com/bitcoin/bitcoin/pull/10102 a
bit, by making the bitcoin-gui -> bitcoin-node startup sequence more similar to
the bitcoin-node -> bitcoin-wallet startup sequence where the parent process
parses arguments and passes them to the child process instead of the parent
process using the child process to parse arguments.
Diffstat (limited to 'src/interfaces/node.cpp')
-rw-r--r-- | src/interfaces/node.cpp | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/src/interfaces/node.cpp b/src/interfaces/node.cpp index e1c3a460e9..206262eb03 100644 --- a/src/interfaces/node.cpp +++ b/src/interfaces/node.cpp @@ -57,22 +57,8 @@ class NodeImpl : public Node { public: NodeImpl(NodeContext* context) { setContext(context); } - void initError(const bilingual_str& message) override { InitError(message); } - bool parseParameters(int argc, const char* const argv[], std::string& error) override - { - return gArgs.ParseParameters(argc, argv, error); - } - bool readConfigFiles(std::string& error) override { return gArgs.ReadConfigFiles(error, true); } - void forceSetArg(const std::string& arg, const std::string& value) override { gArgs.ForceSetArg(arg, value); } - bool softSetArg(const std::string& arg, const std::string& value) override { return gArgs.SoftSetArg(arg, value); } - bool softSetBoolArg(const std::string& arg, bool value) override { return gArgs.SoftSetBoolArg(arg, value); } - void selectParams(const std::string& network) override { SelectParams(network); } - bool initSettings(std::string& error) override { return gArgs.InitSettings(error); } - uint64_t getAssumedBlockchainSize() override { return Params().AssumedBlockchainSize(); } - uint64_t getAssumedChainStateSize() override { return Params().AssumedChainStateSize(); } - std::string getNetwork() override { return Params().NetworkIDString(); } - void initLogging() override { InitLogging(gArgs); } - void initParameterInteraction() override { InitParameterInteraction(gArgs); } + void initLogging() override { InitLogging(*Assert(m_context->args)); } + void initParameterInteraction() override { InitParameterInteraction(*Assert(m_context->args)); } bilingual_str getWarnings() override { return GetWarnings(true); } uint32_t getLogCategories() override { return LogInstance().GetCategoryMask(); } bool baseInitialize() override @@ -109,7 +95,6 @@ public: StopMapPort(); } } - void setupServerArgs() override { return SetupServerArgs(*m_context); } bool getProxy(Network net, proxyType& proxy_info) override { return GetProxy(net, proxy_info); } size_t getNodeCount(CConnman::NumConnections flags) override { |