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).
Seven handlers are extracted, one 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()—tx
Each commit is a pure code move: 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.
Every 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).