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

@@ -6,6 +6,7 @@
#include <interfaces/init.h>
#include <interfaces/ipc.h>
#include <node/context.h>
#include <util/system.h>
#include <memory>
@@ -20,6 +21,7 @@ public:
: m_node(node),
m_ipc(interfaces::MakeIpc(EXE_NAME, arg0, *this))
{
m_node.args = &gArgs;
m_node.init = this;
}
std::unique_ptr<interfaces::Echo> makeEcho() override { return interfaces::MakeEcho(); }

View File

@@ -4,6 +4,7 @@
#include <interfaces/init.h>
#include <node/context.h>
#include <util/system.h>
#include <memory>
@@ -14,6 +15,7 @@ class BitcoindInit : public interfaces::Init
public:
BitcoindInit(NodeContext& node) : m_node(node)
{
m_node.args = &gArgs;
m_node.init = this;
}
NodeContext& m_node;