1
0
Fork 0
forked from lthn/blockchain

get_connectivity_status: is_remote_node_mode flag implemented

This commit is contained in:
sowle 2024-12-04 16:25:17 +01:00
parent 504b4a2ad8
commit 192ad1382c
No known key found for this signature in database
GPG key ID: C07A24B2D89D49FC
2 changed files with 5 additions and 2 deletions

View file

@ -484,12 +484,14 @@ public:
bool is_online;
bool last_daemon_is_disconnected;
bool is_server_busy;
bool is_remote_node_mode;
uint64_t last_proxy_communicate_timestamp;
BEGIN_KV_SERIALIZE_MAP()
KV_SERIALIZE(is_online)
KV_SERIALIZE(is_server_busy)
KV_SERIALIZE(last_daemon_is_disconnected)
KV_SERIALIZE(is_server_busy)
KV_SERIALIZE(is_remote_node_mode)
KV_SERIALIZE(last_proxy_communicate_timestamp)
END_KV_SERIALIZE_MAP()
};

View file

@ -1635,10 +1635,11 @@ bool wallets_manager::get_is_remote_daemon_connected()
std::string wallets_manager::get_connectivity_status()
{
view::general_connectivity_info gci = AUTO_VAL_INIT(gci);
view::general_connectivity_info gci{};
gci.is_online = get_is_remote_daemon_connected();
gci.last_daemon_is_disconnected = m_pproxy_diganostic_info->last_daemon_is_disconnected;
gci.is_server_busy = m_pproxy_diganostic_info->is_busy;
gci.is_remote_node_mode = m_remote_node_mode;
gci.last_proxy_communicate_timestamp = m_rpc_proxy->get_last_success_interract_time();
return epee::serialization::store_t_to_json(gci);
}