mirror of
https://github.com/SChernykh/p2pool.git
synced 2025-01-21 18:04:30 +00:00
API: added ZMQ last active timestamp to network/stats
This commit is contained in:
parent
0d33214557
commit
fb0dc586b2
1 changed files with 4 additions and 2 deletions
|
@ -1552,13 +1552,15 @@ void p2pool::api_update_network_stats()
|
||||||
}
|
}
|
||||||
|
|
||||||
m_api->set(p2pool_api::Category::NETWORK, "stats",
|
m_api->set(p2pool_api::Category::NETWORK, "stats",
|
||||||
[mainnet_tip](log::Stream& s)
|
[this, mainnet_tip](log::Stream& s)
|
||||||
{
|
{
|
||||||
s << "{\"difficulty\":" << mainnet_tip.difficulty
|
s << "{\"difficulty\":" << mainnet_tip.difficulty
|
||||||
<< ",\"hash\":\"" << mainnet_tip.id
|
<< ",\"hash\":\"" << mainnet_tip.id
|
||||||
<< "\",\"height\":" << mainnet_tip.height
|
<< "\",\"height\":" << mainnet_tip.height
|
||||||
<< ",\"reward\":" << mainnet_tip.reward
|
<< ",\"reward\":" << mainnet_tip.reward
|
||||||
<< ",\"timestamp\":" << mainnet_tip.timestamp << "}";
|
<< ",\"timestamp\":" << mainnet_tip.timestamp
|
||||||
|
<< ",\"zmq_last_active\":" << zmq_last_active()
|
||||||
|
<< "}";
|
||||||
});
|
});
|
||||||
|
|
||||||
api_update_stats_mod();
|
api_update_stats_mod();
|
||||||
|
|
Loading…
Reference in a new issue