From e1336316250ab5cb0ed654b1e593378a6e0769ce Mon Sep 17 00:00:00 2001 From: Russell Yanofsky Date: Thu, 23 Aug 2018 13:42:31 -0400 Subject: 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. --- src/qt/paymentserver.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/qt/paymentserver.cpp') diff --git a/src/qt/paymentserver.cpp b/src/qt/paymentserver.cpp index a1da85bda7..431b06d812 100644 --- a/src/qt/paymentserver.cpp +++ b/src/qt/paymentserver.cpp @@ -97,11 +97,11 @@ void PaymentServer::ipcParseCommandLine(interfaces::Node& node, int argc, char* auto tempChainParams = CreateChainParams(CBaseChainParams::MAIN); if (IsValidDestinationString(r.address.toStdString(), *tempChainParams)) { - node.selectParams(CBaseChainParams::MAIN); + SelectParams(CBaseChainParams::MAIN); } else { tempChainParams = CreateChainParams(CBaseChainParams::TESTNET); if (IsValidDestinationString(r.address.toStdString(), *tempChainParams)) { - node.selectParams(CBaseChainParams::TESTNET); + SelectParams(CBaseChainParams::TESTNET); } } } -- cgit v1.2.3