From f907daed13b23ba8715999e1640ca505e079b3d5 Mon Sep 17 00:00:00 2001 From: cryptozoidberg Date: Wed, 4 Mar 2020 21:00:05 +0100 Subject: [PATCH] added current height to wallet_status api --- src/wallet/view_iface.h | 2 ++ src/wallet/wallets_manager.cpp | 1 + 2 files changed, 3 insertions(+) diff --git a/src/wallet/view_iface.h b/src/wallet/view_iface.h index cbfe04a1..41d64ced 100644 --- a/src/wallet/view_iface.h +++ b/src/wallet/view_iface.h @@ -528,12 +528,14 @@ public: uint64_t wallet_state; bool is_in_long_refresh; uint64_t progress; + uint64_t current_daemon_height; BEGIN_KV_SERIALIZE_MAP() KV_SERIALIZE(is_daemon_connected) KV_SERIALIZE(wallet_state) KV_SERIALIZE(is_in_long_refresh) KV_SERIALIZE(progress) + KV_SERIALIZE(current_daemon_height) END_KV_SERIALIZE_MAP() }; diff --git a/src/wallet/wallets_manager.cpp b/src/wallet/wallets_manager.cpp index 94f776df..06b7a3c6 100644 --- a/src/wallet/wallets_manager.cpp +++ b/src/wallet/wallets_manager.cpp @@ -1206,6 +1206,7 @@ std::string wallets_manager::get_wallet_status(uint64_t wallet_id) wsi.is_daemon_connected = get_is_remote_daemon_connected(); wsi.progress = wo.w.unlocked_get().get()->get_sync_progress(); wsi.wallet_state = wo.wallet_state; + wsi.current_daemon_height = m_last_daemon_height; return epee::serialization::store_t_to_json(wsi); }