aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces
diff options
context:
space:
mode:
authorRussell Yanofsky <[email protected]>2019-07-11 18:20:44 -0400
committerMarcoFalke <[email protected]>2019-07-11 19:39:55 -0400
commitfa6f402bde146f92ed131e0c9c8e15a55e723307 (patch)
tree691b18d0ea62750f169aa7def65ddadd0c3ec181 /src/interfaces
parentinit: Use InitError for all errors in bitcoind/qt (diff)
downloaddiscoin-fa6f402bde146f92ed131e0c9c8e15a55e723307.tar.xz
discoin-fa6f402bde146f92ed131e0c9c8e15a55e723307.zip
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 584d218db..fd2fb6531 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 1ccd2a31b..bb4b3e1fa 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;