diff options
author | John Newbery <john@johnnewbery.com> | 2017-03-30 08:38:46 -0400 |
---|---|---|
committer | John Newbery <john@johnnewbery.com> | 2017-04-18 17:20:09 -0400 |
commit | 2a52ae63bfdde948250df1c876dcdd5af99f03b5 (patch) | |
tree | d53a338b3c6c9eba1474330412dd0e5953822399 /test/functional/p2p-versionbits-warning.py | |
parent | 52e15aa4d067fc4ace12c80be5c82e85c04fcfec (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-versionbits-warning.py')
-rwxr-xr-x | test/functional/p2p-versionbits-warning.py | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/test/functional/p2p-versionbits-warning.py b/test/functional/p2p-versionbits-warning.py index da960e2d80..06cdd5f91d 100755 --- a/test/functional/p2p-versionbits-warning.py +++ b/test/functional/p2p-versionbits-warning.py @@ -24,28 +24,10 @@ WARN_UNKNOWN_RULES_MINED = "Unknown block versions being mined! It's possible un WARN_UNKNOWN_RULES_ACTIVE = "unknown new rules activated (versionbit {})".format(VB_UNKNOWN_BIT) VB_PATTERN = re.compile("^Warning.*versionbit") -# TestNode: bare-bones "peer". Used mostly as a conduit for a test to sending -# p2p messages to a node, generating the messages in the main testing logic. class TestNode(NodeConnCB): - def __init__(self): - super().__init__() - self.connection = None - self.ping_counter = 1 - self.last_pong = msg_pong() - - def add_connection(self, conn): - self.connection = conn - def on_inv(self, conn, message): pass - # Wrapper for the NodeConn's send_message function - def send_message(self, message): - self.connection.send_message(message) - - def on_pong(self, conn, message): - self.last_pong = message - class VersionBitsWarningTest(BitcoinTestFramework): def __init__(self): super().__init__() |