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:29:41 +0000
commit9ce4c3c4c1682032500c97af2d6383897b87c413 (patch)
tree91948ee41870498512f3f3c13636140d76b9589b /test/functional/p2p_leak.py
parent010542614dbebba5f5ad6a58c0554930e9e214fc (diff)
downloadbitcoin-9ce4c3c4c1682032500c97af2d6383897b87c413.tar.xz
[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.
Diffstat (limited to 'test/functional/p2p_leak.py')
-rwxr-xr-xtest/functional/p2p_leak.py2
1 files changed, 2 insertions, 0 deletions
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)