diff options
author | Suhas Daftuar <sdaftuar@gmail.com> | 2022-08-12 10:05:22 -0400 |
---|---|---|
committer | Suhas Daftuar <sdaftuar@gmail.com> | 2022-08-29 08:10:35 -0400 |
commit | 03712dddfbb9fe0dc7a2ead53c65106189f5c803 (patch) | |
tree | 26fa9f85ab867705e094f9b4a7826e7553021dfe /src/net_processing.cpp | |
parent | 150a5486db50ff77c91765392149000029c8a309 (diff) | |
download | bitcoin-03712dddfbb9fe0dc7a2ead53c65106189f5c803.tar.xz |
Expose HeadersSyncState::m_current_height in getpeerinfo()
Diffstat (limited to 'src/net_processing.cpp')
-rw-r--r-- | src/net_processing.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/net_processing.cpp b/src/net_processing.cpp index ac19593b0f..f471e96b50 100644 --- a/src/net_processing.cpp +++ b/src/net_processing.cpp @@ -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; } |