aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDhruv Mehta <856960+dhruv@users.noreply.github.com>2020-08-14 22:42:30 -0700
committerDhruv Mehta <856960+dhruv@users.noreply.github.com>2020-08-18 13:06:15 -0700
commitf6f082b9343522bc8005f23937ac6ecf56548c98 (patch)
tree119968e9bf6c7297bdc03be3e4c6f176775eef70 /test
parent45cf55ccac94689e48dd0648ed2401918a778024 (diff)
test: remove `CNodeNoVersionIdle` from p2p_leak.py
Diffstat (limited to 'test')
-rwxr-xr-xtest/functional/p2p_leak.py16
1 files changed, 7 insertions, 9 deletions
diff --git a/test/functional/p2p_leak.py b/test/functional/p2p_leak.py
index b3b61b560b..23152c9dcf 100755
--- a/test/functional/p2p_leak.py
+++ b/test/functional/p2p_leak.py
@@ -64,13 +64,6 @@ class CLazyNode(P2PInterface):
def on_blocktxn(self, message): self.bad_message(message)
-# Node that never sends a version. This one just sits idle and hopes to receive
-# any message (it shouldn't!)
-class CNodeNoVersionIdle(CLazyNode):
- def __init__(self):
- super().__init__()
-
-
# Node that sends a version but not a verack.
class CNodeNoVerackIdle(CLazyNode):
def __init__(self):
@@ -105,7 +98,12 @@ class P2PLeakTest(BitcoinTestFramework):
# from this node anyway and verify eventual disconnection.
no_version_disconnect_node = self.nodes[0].add_p2p_connection(
CLazyNode(), send_version=False, wait_for_verack=False)
- no_version_idlenode = self.nodes[0].add_p2p_connection(CNodeNoVersionIdle(), send_version=False, wait_for_verack=False)
+
+ # Another peer that never sends a version. Just sits idle and hopes to receive
+ # any message (it shouldn't!)
+ no_version_idlenode = self.nodes[0].add_p2p_connection(CLazyNode(), send_version=False, wait_for_verack=False)
+
+ # Peer that sends a version but not a verack.
no_verack_idlenode = self.nodes[0].add_p2p_connection(CNodeNoVerackIdle(), wait_for_verack=False)
# Send enough ping messages (any non-version message will do) prior to sending
@@ -113,7 +111,7 @@ class P2PLeakTest(BitcoinTestFramework):
for _ in range(DISCOURAGEMENT_THRESHOLD):
no_version_disconnect_node.send_message(msg_ping())
- # Wait until we got the verack in response to the version. Though, don't wait for the other node to receive the
+ # Wait until we got the verack in response to the version. Though, don't wait for self.nodes[0] to receive the
# verack, since we never sent one
no_verack_idlenode.wait_for_verack()