aboutsummaryrefslogtreecommitdiff
path: root/test/functional/p2p-leaktests.py
diff options
context:
space:
mode:
authorJohn Newbery <john@johnnewbery.com>2017-03-30 08:38:46 -0400
committerJohn Newbery <john@johnnewbery.com>2017-04-18 17:20:09 -0400
commit2a52ae63bfdde948250df1c876dcdd5af99f03b5 (patch)
treed53a338b3c6c9eba1474330412dd0e5953822399 /test/functional/p2p-leaktests.py
parent52e15aa4d067fc4ace12c80be5c82e85c04fcfec (diff)
Remove duplicate method definitions in NodeConnCB subclasses
All Node classes in individual test cases subclass from NodeConnCB. Many have duplicate definitions for methods that are defined in the base class. This commit removes those duplicate definitions. This commit removes ~290 lines of duplicate code.
Diffstat (limited to 'test/functional/p2p-leaktests.py')
-rwxr-xr-xtest/functional/p2p-leaktests.py11
1 files changed, 0 insertions, 11 deletions
diff --git a/test/functional/p2p-leaktests.py b/test/functional/p2p-leaktests.py
index 2423d4a969..4cc3107cf8 100755
--- a/test/functional/p2p-leaktests.py
+++ b/test/functional/p2p-leaktests.py
@@ -20,17 +20,9 @@ banscore = 10
class CLazyNode(NodeConnCB):
def __init__(self):
super().__init__()
- self.connection = None
self.unexpected_msg = False
- self.connected = False
self.ever_connected = False
- def add_connection(self, conn):
- self.connection = conn
-
- def send_message(self, message):
- self.connection.send_message(message)
-
def bad_message(self, message):
self.unexpected_msg = True
self.log.info("should not have received message: %s" % message.command)
@@ -65,9 +57,6 @@ class CLazyNode(NodeConnCB):
# Node that never sends a version. We'll use this to send a bunch of messages
# anyway, and eventually get disconnected.
class CNodeNoVersionBan(CLazyNode):
- def __init__(self):
- super().__init__()
-
# send a bunch of veracks without sending a message. This should get us disconnected.
# NOTE: implementation-specific check here. Remove if bitcoind ban behavior changes
def on_open(self, conn):