diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2016-11-29 10:54:38 +0000 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2016-11-29 10:54:38 +0000 |
commit | fcd178ef334fb11614cd6c4e851b4ab34b96dde3 (patch) | |
tree | d3998def2c4c30cba8dd5eb26a4daac29e6cdaa7 /src/wallet/wallet2_api.h | |
parent | Merge pull request #1346 (diff) | |
download | monero-fcd178ef334fb11614cd6c4e851b4ab34b96dde3.tar.xz |
wallet_api: add a few daemon related getters
Blockchain height, version, Mining hash rate...
Diffstat (limited to 'src/wallet/wallet2_api.h')
-rw-r--r-- | src/wallet/wallet2_api.h | 17 |
1 files changed, 17 insertions, 0 deletions
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; }; |