aboutsummaryrefslogtreecommitdiff
path: root/test/functional/p2p_leak.py
diff options
context:
space:
mode:
authorJohn Newbery <john@johnnewbery.com>2020-11-28 11:41:25 +0000
committerJohn Newbery <john@johnnewbery.com>2021-02-17 09:22:37 +0000
commit9b4054cb7af22123c7fcc4989e143606a630b2af (patch)
tree3556018b69f5e836bf127413544b90a0982e22ba /test/functional/p2p_leak.py
parent7e158a69104831611462cb555da931331b237c78 (diff)
downloadbitcoin-9b4054cb7af22123c7fcc4989e143606a630b2af.tar.xz
[test] Move MY_SUBVERSION to p2p.py
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 MY_SUBVERSION to p2p.py. Also rename to P2P_SUBVERSION.
Diffstat (limited to 'test/functional/p2p_leak.py')
-rwxr-xr-xtest/functional/p2p_leak.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/test/functional/p2p_leak.py b/test/functional/p2p_leak.py
index ca8bf908a9..2cf327fc18 100755
--- a/test/functional/p2p_leak.py
+++ b/test/functional/p2p_leak.py
@@ -17,7 +17,10 @@ from test_framework.messages import (
msg_ping,
msg_version,
)
-from test_framework.p2p import P2PInterface
+from test_framework.p2p import (
+ P2PInterface,
+ P2P_SUBVERSION,
+)
from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import (
assert_equal,
@@ -131,6 +134,7 @@ class P2PLeakTest(BitcoinTestFramework):
p2p_old_peer = self.nodes[0].add_p2p_connection(P2PInterface(), send_version=False, wait_for_verack=False)
old_version_msg = msg_version()
old_version_msg.nVersion = 31799
+ old_version_msg.strSubVer = P2P_SUBVERSION
with self.nodes[0].assert_debug_log(['peer=3 using obsolete version 31799; disconnecting']):
p2p_old_peer.send_message(old_version_msg)
p2p_old_peer.wait_for_disconnect()