You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Merge bitcoin#20524: test: Move MIN_VERSION_SUPPORTED to p2p.py
9f21ed4 [test] Check user agent string from test framework connections (John Newbery)
9ce4c3c [test] Add P2P_SERVICES to p2p.py (John Newbery)
0105426 [test] Move MY_RELAY to p2p.py (John Newbery)
9b4054c [test] Move MY_SUBVERSION to p2p.py (John Newbery)
7e158a6 [test] Move MY_VERSION to p2p.py (John Newbery)
6523111 [test] Move MIN_VERSION_SUPPORTED to p2p.py (John Newbery)
Pull request description:
The messages.py module should contain code and helpers for
[de]serializing p2p messages. Specific usage of those messages should
be in p2p.py. This PR moves test framework specific constants to p2p.py.
It also changes the SUBVERSION constant to be a string instead of a bytes object. That means that it needs to be explicitly converted to a bytes object to serialize into a version message. Failing to do so would cause an easy-to-spot bug. This should avoid silent failures like the one solved in bitcoin#20522.
ACKs for top commit:
laanwj:
Code review ACK 9f21ed4
Tree-SHA512: 41d46575ac0ec36ad074d6c6a5b9cef50b05eeb8ddd8ed0a8f0d0c4617cc7b8baa6580af5b83a668230ce1ac27bf0e56914d0361a48b1b05fd75e2e60350eeaf
assertmessage.nVersion>=MIN_VERSION_SUPPORTED, "Version {} received. Test framework only supports versions greater than {}".format(message.nVersion, MIN_VERSION_SUPPORTED)
434
+
assertmessage.nVersion>=MIN_P2P_VERSION_SUPPORTED, "Version {} received. Test framework only supports versions greater than {}".format(message.nVersion, MIN_P2P_VERSION_SUPPORTED)
0 commit comments