aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces
diff options
context:
space:
mode:
authorRussell Yanofsky <russ@yanofsky.org>2019-07-11 18:20:44 -0400
committerMarcoFalke <falke.marco@gmail.com>2019-07-11 19:39:55 -0400
commitfa6f402bde146f92ed131e0c9c8e15a55e723307 (patch)
tree691b18d0ea62750f169aa7def65ddadd0c3ec181 /src/interfaces
parentfad2502240a1c440ef03ac3f880475702e418275 (diff)
downloadbitcoin-fa6f402bde146f92ed131e0c9c8e15a55e723307.tar.xz
Call node->initError instead of InitError from GUI code
Avoids GUI code calling a node function, and having to live in the same process as g_ui_signals and uiInterface global variables.
Diffstat (limited to 'src/interfaces')
-rw-r--r--src/interfaces/node.cpp1
-rw-r--r--src/interfaces/node.h3
2 files changed, 4 insertions, 0 deletions
diff --git a/src/interfaces/node.cpp b/src/interfaces/node.cpp
index 584d218dba..fd2fb6531b 100644
--- a/src/interfaces/node.cpp
+++ b/src/interfaces/node.cpp
@@ -54,6 +54,7 @@ class NodeImpl : public Node
{
public:
NodeImpl() { m_interfaces.chain = MakeChain(); }
+ void initError(const std::string& message) override { InitError(message); }
bool parseParameters(int argc, const char* const argv[], std::string& error) override
{
return gArgs.ParseParameters(argc, argv, error);
diff --git a/src/interfaces/node.h b/src/interfaces/node.h
index 1ccd2a31b7..bb4b3e1fae 100644
--- a/src/interfaces/node.h
+++ b/src/interfaces/node.h
@@ -38,6 +38,9 @@ class Node
public:
virtual ~Node() {}
+ //! Send init error.
+ virtual void initError(const std::string& message) = 0;
+
//! Set command line arguments.
virtual bool parseParameters(int argc, const char* const argv[], std::string& error) = 0;