1
0
Fork 0
forked from lthn/blockchain

added current height to wallet_status api

This commit is contained in:
cryptozoidberg 2020-03-04 21:00:05 +01:00
parent fa1af3e3aa
commit f907daed13
No known key found for this signature in database
GPG key ID: 22DEB97A54C6FDEC
2 changed files with 3 additions and 0 deletions

View file

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

View file

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