P2P violations

Bitcoin Core has several options for how to treat peers that violate the rules of the P2P protocol:

  1. Ignore the individual message, but continue processing other messages from that peer

  2. Increment the peer’s "misbehaviour" score, and punish the peer once its score goes above a certain amount

  3. Disconnect from the peer

  4. Disconnect from the peer and prevent any later connections from that peer’s address (discouragement)

Since PR#20079 we now treat handshake misbehaviour like an unknown message