HomePhabricator

p2p: Ignore version msgs after initial version msg

Description

p2p: Ignore version msgs after initial version msg

Summary:
Sending a version message after the intial version message is peer
misbehavior. Though, it seems arbitrary and confusing to disconnect only
after exactly 100 version messages. Duplicate version messages affect us
no different than any other unknown message. So remove the Misbehaving
and ignore the redundant msgs.

This is a partial backport of core#20079
https://github.com/bitcoin/bitcoin/pull/20079/commits/faaad1bbac46cfeb22654b4c59f0aac7a680c03a

Depends on D18017

Test Plan: ninja all check-all

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Differential Revision: https://reviews.bitcoinabc.org/D18021

Details

Provenance
MarcoFalke <falke.marco@gmail.com>Authored on Oct 5 2020, 14:21
PiRKCommitted on Tue, Apr 29, 17:48
PiRKPushed on Tue, Apr 29, 17:48
Reviewer
Restricted Project
Differential Revision
D18021: p2p: Ignore version msgs after initial version msg
Parents
rABC07d226cbf3a0: [avalanche] bump the misbehavior for oversized AVAPOLL messages
Branches
Unknown
Tags
Unknown