diff options
author | Riccardo Spagni <ric@spagni.net> | 2016-10-04 12:15:02 +0200 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2016-10-04 12:15:02 +0200 |
commit | 2723cd12e15defadbf98123ae6791fedc8172814 (patch) | |
tree | ae9a65a0ddc141371d8eb7ef03e1de80efbb6107 /src/wallet/api/wallet.cpp | |
parent | Merge pull request #1165 (diff) | |
parent | wallet2_api: added Wallet::daemonBlockChainTargetHeight() (diff) | |
download | monero-2723cd12e15defadbf98123ae6791fedc8172814.tar.xz |
Merge pull request #1173
65ea836 wallet2_api: added Wallet::daemonBlockChainTargetHeight() libwallet_api: Wallet::blockChainTargetHeight (Jacob Brydolf)
Diffstat (limited to 'src/wallet/api/wallet.cpp')
-rw-r--r-- | src/wallet/api/wallet.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/wallet/api/wallet.cpp b/src/wallet/api/wallet.cpp index 16321a5a2..4d35bc404 100644 --- a/src/wallet/api/wallet.cpp +++ b/src/wallet/api/wallet.cpp @@ -438,6 +438,23 @@ uint64_t WalletImpl::daemonBlockChainHeight() const return result; } +uint64_t WalletImpl::daemonBlockChainTargetHeight() const +{ + std::string err; + uint64_t result = m_wallet->get_daemon_blockchain_target_height(err); + if (!err.empty()) { + LOG_ERROR(__FUNCTION__ << ": " << err); + result = 0; + m_errorString = err; + m_status = Status_Error; + + } else { + m_status = Status_Ok; + m_errorString = ""; + } + return result; +} + bool WalletImpl::refresh() { clearStatus(); |