wallet2_api: added Wallet::daemonBlockChainHeight()

This commit is contained in:
Ilya Kitaev
2016-09-26 21:35:00 +03:00
parent 9de3ec3e2a
commit 7b4a85b309
7 changed files with 78 additions and 9 deletions

View File

@@ -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();