mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-19 14:53:43 +01:00
Expose HeadersSyncState::m_current_height in getpeerinfo()
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user