From fcd178ef334fb11614cd6c4e851b4ab34b96dde3 Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Tue, 29 Nov 2016 10:54:38 +0000 Subject: wallet_api: add a few daemon related getters Blockchain height, version, Mining hash rate... --- src/wallet/wallet2_api.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'src/wallet/wallet2_api.h') diff --git a/src/wallet/wallet2_api.h b/src/wallet/wallet2_api.h index e624ffa69..185d1c009 100644 --- a/src/wallet/wallet2_api.h +++ b/src/wallet/wallet2_api.h @@ -486,6 +486,23 @@ struct WalletManager //! returns verbose error string regarding last error; virtual std::string errorString() const = 0; + //! set the daemon address (hostname and port) + virtual void setDaemonAddress(const std::string &address) = 0; + + //! returns whether the daemon can be reached, and its version number + virtual bool connected(uint32_t *version = NULL) const = 0; + + //! returns current blockchain height + virtual uint64_t blockchainHeight() const = 0; + + //! returns current blockchain target height + virtual uint64_t blockchainTargetHeight() const = 0; + + //! returns current network difficulty + virtual uint64_t networkDifficulty() const = 0; + + //! returns current mining hash rate (0 if not mining) + virtual double miningHashRate() const = 0; }; -- cgit v1.2.3