aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/api/wallet.cpp
diff options
context:
space:
mode:
authorIlya Kitaev <mbg033@gmail.com>2016-09-26 21:35:00 +0300
committerIlya Kitaev <mbg033@gmail.com>2016-09-26 23:19:25 +0300
commit7b4a85b309aa0fb864d63a2fd6f1ae062aaa71dd (patch)
treebd7c073734e9de7b2326ded18bfda73557aaa9eb /src/wallet/api/wallet.cpp
parentlibwallet_api: Wallet::blockChainHeight, WalletListener::newBlock (diff)
downloadmonero-7b4a85b309aa0fb864d63a2fd6f1ae062aaa71dd.tar.xz
wallet2_api: added Wallet::daemonBlockChainHeight()
Diffstat (limited to 'src/wallet/api/wallet.cpp')
-rw-r--r--src/wallet/api/wallet.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/wallet/api/wallet.cpp b/src/wallet/api/wallet.cpp
index eef956e80..986deca1f 100644
--- a/src/wallet/api/wallet.cpp
+++ b/src/wallet/api/wallet.cpp
@@ -422,6 +422,21 @@ uint64_t WalletImpl::blockChainHeight() const
return m_wallet->get_blockchain_current_height();
}
+uint64_t WalletImpl::daemonBlockChainHeight() const
+{
+ std::string err;
+ uint64_t result = m_wallet->get_daemon_blockchain_height(err);
+ if (!err.empty()) {
+ LOG_ERROR(__FUNCTION__ << ": " << err);
+ m_errorString = err;
+ m_status = Status_Error;
+ } else {
+ m_status = Status_Ok;
+ m_errorString = "";
+ }
+ return result;
+}
+
bool WalletImpl::refresh()
{
clearStatus();