Expose HeadersSyncState::m_current_height in getpeerinfo()

This commit is contained in:
Suhas Daftuar
2022-08-12 10:05:22 -04:00
parent 150a5486db
commit 03712dddfb
5 changed files with 63 additions and 0 deletions

View File

@@ -1566,6 +1566,12 @@ bool PeerManagerImpl::GetNodeStateStats(NodeId nodeid, CNodeStateStats& stats) c
stats.m_addr_processed = peer->m_addr_processed.load();
stats.m_addr_rate_limited = peer->m_addr_rate_limited.load();
stats.m_addr_relay_enabled = peer->m_addr_relay_enabled.load();
{
LOCK(peer->m_headers_sync_mutex);
if (peer->m_headers_sync) {
stats.presync_height = peer->m_headers_sync->GetPresyncHeight();
}
}
return true;
}