aboutsummaryrefslogtreecommitdiff
path: root/src/interface/node.cpp
diff options
context:
space:
mode:
authorRussell Yanofsky <russ@yanofsky.org>2017-04-17 14:23:14 -0400
committerJohn Newbery <john@johnnewbery.com>2018-04-04 16:52:40 -0400
commitc0f2756be517feddacd7c6b89b9faa888b3fef8e (patch)
tree14986754eac1bc64cf1b409237bc1b6edc85ed26 /src/interface/node.cpp
parent71e0d90876efd11e2a4aeb8f3f806c5a1fd54b42 (diff)
downloadbitcoin-c0f2756be517feddacd7c6b89b9faa888b3fef8e.tar.xz
Remove direct bitcoin calls from qt/optionsmodel.cpp
Diffstat (limited to 'src/interface/node.cpp')
-rw-r--r--src/interface/node.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/interface/node.cpp b/src/interface/node.cpp
index 4e3fa6ceb9..877c5f57a8 100644
--- a/src/interface/node.cpp
+++ b/src/interface/node.cpp
@@ -7,6 +7,9 @@
#include <chainparams.h>
#include <init.h>
#include <interface/handler.h>
+#include <net.h>
+#include <netaddress.h>
+#include <netbase.h>
#include <scheduler.h>
#include <ui_interface.h>
#include <util.h>
@@ -24,6 +27,8 @@ class NodeImpl : public Node
gArgs.ParseParameters(argc, argv);
}
void readConfigFile(const std::string& conf_path) override { gArgs.ReadConfigFile(conf_path); }
+ 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); }
void initLogging() override { InitLogging(); }
void initParameterInteraction() override { InitParameterInteraction(); }
@@ -40,6 +45,16 @@ class NodeImpl : public Node
Shutdown();
}
void startShutdown() override { StartShutdown(); }
+ void mapPort(bool use_upnp) override
+ {
+ if (use_upnp) {
+ StartMapPort();
+ } else {
+ InterruptMapPort();
+ StopMapPort();
+ }
+ }
+ bool getProxy(Network net, proxyType& proxy_info) override { return GetProxy(net, proxy_info); }
std::unique_ptr<Handler> handleInitMessage(InitMessageFn fn) override
{
return MakeHandler(::uiInterface.InitMessage.connect(fn));