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
The messages.py module should contain code and helpers for
[de]serializing p2p messages. Specific usage of those messages should
be in p2p.py. Therefore move MIN_VERSION_SUPPORTED to p2p.py.
Also rename to MIN_P2P_VERSION_SUPPORTED to distinguish it from
other versioning used in Bitcoin/Bitcoin Core.
Copy file name to clipboardExpand all lines: test/functional/test_framework/p2p.py
+4-2Lines changed: 4 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -31,7 +31,6 @@
31
31
fromtest_framework.messagesimport (
32
32
CBlockHeader,
33
33
MAX_HEADERS_RESULTS,
34
-
MIN_VERSION_SUPPORTED,
35
34
msg_addr,
36
35
msg_addrv2,
37
36
msg_block,
@@ -79,6 +78,9 @@
79
78
80
79
logger=logging.getLogger("TestFramework.p2p")
81
80
81
+
# The minimum P2P version that this test framework supports
82
+
MIN_P2P_VERSION_SUPPORTED=60001
83
+
82
84
MESSAGEMAP= {
83
85
b"addr": msg_addr,
84
86
b"addrv2": msg_addrv2,
@@ -417,7 +419,7 @@ def on_verack(self, message):
417
419
pass
418
420
419
421
defon_version(self, message):
420
-
assertmessage.nVersion>=MIN_VERSION_SUPPORTED, "Version {} received. Test framework only supports versions greater than {}".format(message.nVersion, MIN_VERSION_SUPPORTED)
422
+
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