aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/api/wallet.cpp
diff options
context:
space:
mode:
authorIlya Kitaev <mbg033@gmail.com>2016-09-28 00:31:21 +0300
committerIlya Kitaev <mbg033@gmail.com>2016-09-28 00:31:21 +0300
commita6688200fb3f2608b80a419f8231647581a81ca0 (patch)
tree43177b0329b3f9b9055042cb133c36ce4259ebd8 /src/wallet/api/wallet.cpp
parentlibwallet_api: tests: fixed WalletCallbackReceived test (diff)
downloadmonero-a6688200fb3f2608b80a419f8231647581a81ca0.tar.xz
libwallet_api: explicitly return 0 in Wallet::daemonBlockChainHeight()
on error
Diffstat (limited to 'src/wallet/api/wallet.cpp')
-rw-r--r--src/wallet/api/wallet.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/wallet/api/wallet.cpp b/src/wallet/api/wallet.cpp
index 9a001abf3..e249080b1 100644
--- a/src/wallet/api/wallet.cpp
+++ b/src/wallet/api/wallet.cpp
@@ -428,8 +428,10 @@ uint64_t WalletImpl::daemonBlockChainHeight() const
uint64_t result = m_wallet->get_daemon_blockchain_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 = "";