aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces
diff options
context:
space:
mode:
authorRussell Yanofsky <russ@yanofsky.org>2017-07-28 22:59:47 -0400
committerRussell Yanofsky <russ@yanofsky.org>2019-02-22 15:43:02 -0400
commite2c8ba9f6e782e2545b71e9e34b967c69e18c7f0 (patch)
treeb23691d11eac220ec44a617ecf9b32ce3cabb05a /src/interfaces
parentc5e59a96a8561b6a0bcaba0ede2d53dbaac113b0 (diff)
downloadbitcoin-e2c8ba9f6e782e2545b71e9e34b967c69e18c7f0.tar.xz
Remove uses of InitMessage/Warning/Error in wallet code
This commit does not change behavior.
Diffstat (limited to 'src/interfaces')
-rw-r--r--src/interfaces/chain.cpp4
-rw-r--r--src/interfaces/chain.h9
2 files changed, 13 insertions, 0 deletions
diff --git a/src/interfaces/chain.cpp b/src/interfaces/chain.cpp
index a654f55f55..4f60448958 100644
--- a/src/interfaces/chain.cpp
+++ b/src/interfaces/chain.cpp
@@ -16,6 +16,7 @@
#include <threadsafety.h>
#include <timedata.h>
#include <txmempool.h>
+#include <ui_interface.h>
#include <uint256.h>
#include <util/system.h>
#include <validation.h>
@@ -239,6 +240,9 @@ public:
bool getPruneMode() override { return ::fPruneMode; }
bool p2pEnabled() override { return g_connman != nullptr; }
int64_t getAdjustedTime() override { return GetAdjustedTime(); }
+ void initMessage(const std::string& message) override { ::uiInterface.InitMessage(message); }
+ void initWarning(const std::string& message) override { InitWarning(message); }
+ void initError(const std::string& message) override { InitError(message); }
};
} // namespace
diff --git a/src/interfaces/chain.h b/src/interfaces/chain.h
index c5aa67d0d7..b1e3f59452 100644
--- a/src/interfaces/chain.h
+++ b/src/interfaces/chain.h
@@ -167,6 +167,15 @@ public:
//! Get adjusted time.
virtual int64_t getAdjustedTime() = 0;
+
+ //! Send init message.
+ virtual void initMessage(const std::string& message) = 0;
+
+ //! Send init warning.
+ virtual void initWarning(const std::string& message) = 0;
+
+ //! Send init error.
+ virtual void initError(const std::string& message) = 0;
};
//! Interface to let node manage chain clients (wallets, or maybe tools for