From 9ce4c3c4c1682032500c97af2d6383897b87c413 Mon Sep 17 00:00:00 2001 From: John Newbery Date: Sat, 28 Nov 2020 11:41:25 +0000 Subject: [test] Add P2P_SERVICES 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 specify the nServices value in the calling code, not in the messages.py module. --- test/functional/p2p_leak.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'test/functional/p2p_leak.py') diff --git a/test/functional/p2p_leak.py b/test/functional/p2p_leak.py index 42e9b9f270..12b8b7baff 100755 --- a/test/functional/p2p_leak.py +++ b/test/functional/p2p_leak.py @@ -20,6 +20,7 @@ from test_framework.messages import ( from test_framework.p2p import ( P2PInterface, P2P_SUBVERSION, + P2P_SERVICES, P2P_VERSION_RELAY, ) from test_framework.test_framework import BitcoinTestFramework @@ -136,6 +137,7 @@ class P2PLeakTest(BitcoinTestFramework): old_version_msg = msg_version() old_version_msg.nVersion = 31799 old_version_msg.strSubVer = P2P_SUBVERSION + old_version_msg.nServices = P2P_SERVICES old_version_msg.relay = P2P_VERSION_RELAY with self.nodes[0].assert_debug_log(['peer=3 using obsolete version 31799; disconnecting']): p2p_old_peer.send_message(old_version_msg) -- cgit v1.2.3