Add a fuzz harness for ConnectionType::PRIVATE_BROADCAST, a privacy-preserving transaction relay mechanism whose p2p code paths had no meaningful fuzz coverage.
Current process_message touches it but is insufficient in exercising it. It creates PRIVATE_BROADCAST nodes via ConsumeNode(), but some structural problems prevent it from covering the relevant logic:
m_tx_for_private_broadcastis never seeded,PushPrivateBroadcastTxalways takes the immediate disconnect path (7 accidental hits, all on lines 3559–3562). Lines 3564–3570 (the actual INV send) had 0 hits.ALL_NET_MESSAGE_TYPESis used as the message pool.CConnman::PushMessagesilently drops anything outside the five-type allowlist for private broadcast connections, wasting most iterations.- Connection types are picked randomly, hence private broadcast coverage is accidental.
To solve the issues above;
- this harness explicitly constructs nodes with
ConnectionType::PRIVATE_BROADCAST - seeds
m_tx_for_private_broadcastviaInitiateTxBroadcastPrivatebefore the peer connects, soPushPrivateBroadcastTxreaches the transaction send path - constrains the message pool to the five types permitted by
CConnman::PushMessageon private broadcast connections (VERSION,VERACK,GETDATA,PONG) - passes
{NODE_NONE}toInitializeNode, matching whatPushNodeVersionadvertises for private broadcast peers.