diff --git a/src/p2pool.cpp b/src/p2pool.cpp index 9399790..8850594 100644 --- a/src/p2pool.cpp +++ b/src/p2pool.cpp @@ -1552,13 +1552,15 @@ void p2pool::api_update_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 << ",\"hash\":\"" << mainnet_tip.id << "\",\"height\":" << mainnet_tip.height << ",\"reward\":" << mainnet_tip.reward - << ",\"timestamp\":" << mainnet_tip.timestamp << "}"; + << ",\"timestamp\":" << mainnet_tip.timestamp + << ",\"zmq_last_active\":" << zmq_last_active() + << "}"; }); api_update_stats_mod();