PeerManagerImpl::ProcessMessage() is a ~1000-line function handling every p2p message type inline, which makes it hard to navigate and review.
This PR continues splitting it into per-message helper functions, following the pattern of the recently merged fa5ab0220e02377c3c855042ecdf1f5f950d0965 (ProcessPong()) and fa55723b8fbd4fd056dddac5b35daf2e86021422 (ProcessAddrs()), as suggested by maflcko #34588 (comment).
Nine handlers are extracted, one move-only commit each:
ProcessGetAddr()—getaddrProcessGetDataMessage()—getdata(named to avoid colliding with the existingProcessGetData(), which services the request queue this handler fills)ProcessGetBlocks()—getblocksProcessGetHeaders()—getheadersProcessInv()—invProcessSendTxRcncl()—sendtxrcnclProcessTx()—txProcessCompactBlock()—cmpctblockProcessVersion()—version
Each extraction commit is a code move with indentation adjustments: the only new lines are the declaration (with thread-safety annotations), the function signature, and the one-line call site.
Each call site is Helper(...); return;, so return statements inside the moved bodies keep identical semantics. No behavior change apart from the __func__ prefix in one getheaders debug log, which now prints ProcessGetHeaders instead of ProcessMessage.
One final cleanup commit normalizes the remaining formatting, replaces equivalent break statements with return in ProcessSendTxRcncl(), and simplifies the send_getaddr conditional in ProcessVersion().
Each extraction commit can be reviewed with the git options:
--color-moved=dimmed-zebra --color-moved-ws=ignore-all-space
Declarations and definitions are placed next to related existing helpers (e.g. ProcessGetDataMessage next to ProcessGetData, ProcessGetBlocks next to ProcessGetBlockData, ProcessGetAddr after ProcessAddrs).