p2p: Ignore CMPCTBLOCK from peer that hasn't sent SENDCMPCT

This commit also changes the default sendcmpct version in the functional
test to `2`, since this is the version that nodes expect, prior to this
commit, nowhere in the functional test framework was the default version
value used:

git grep -P 'msg_sendcmpct\((?![^)]*version\s*=)' HEAD^

`version=2` is a sensible default, since this is the version nodes
currently expect in the SENDCMPCT handshake.
This commit is contained in:
David Gumberg
2026-02-19 16:06:26 -08:00
parent bf9884f4e5
commit 9c5dd2926a
4 changed files with 25 additions and 1 deletions

View File

@@ -1672,7 +1672,7 @@ class msg_sendcmpct:
__slots__ = ("announce", "version")
msgtype = b"sendcmpct"
def __init__(self, announce=False, version=1):
def __init__(self, announce=False, version=2):
self.announce = announce
self.version = version