rpc, net: deprecate startingheight field of getpeerinfo RPC

The reported starting height of a peer in the VERSION message is
untrusted, and it doesn't seem to be useful anymore (after #20624),
so deprecating the corresponding "startingheight" field seems
reasonable. After that, it can be removed, along with the
`m_starting_height` field of the Peer / CNodeStats structs, as it is
sufficient to show the reported height only once at connection in the
debug log.
This commit is contained in:
Sebastian Falbesoner
2026-01-03 19:08:20 +01:00
parent ab233255d4
commit 4ce3f4a265
4 changed files with 16 additions and 3 deletions

View File

@@ -268,6 +268,7 @@ struct Peer {
bool m_outbound_version_message_sent GUARDED_BY(NetEventsInterface::g_msgproc_mutex){false};
/** This peer's reported block height when we connected */
// TODO: remove in v32.0, only show reported height once in "receive version message: ..." debug log
std::atomic<int> m_starting_height{-1};
/** The pong reply we're expecting, or 0 if no pong expected. */