aboutsummaryrefslogtreecommitdiff
path: root/test/functional/p2p-versionbits-warning.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/functional/p2p-versionbits-warning.py')
-rwxr-xr-xtest/functional/p2p-versionbits-warning.py21
1 files changed, 1 insertions, 20 deletions
diff --git a/test/functional/p2p-versionbits-warning.py b/test/functional/p2p-versionbits-warning.py
index da960e2d80..41921fe14e 100755
--- a/test/functional/p2p-versionbits-warning.py
+++ b/test/functional/p2p-versionbits-warning.py
@@ -12,7 +12,6 @@ from test_framework.mininode import *
from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import *
import re
-import time
from test_framework.blocktools import create_block, create_coinbase
VB_PERIOD = 144 # versionbits period length for regtest
@@ -24,28 +23,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__()
@@ -58,7 +39,7 @@ class VersionBitsWarningTest(BitcoinTestFramework):
with open(self.alert_filename, 'w', encoding='utf8') as _:
pass
self.extra_args = [["-alertnotify=echo %s >> \"" + self.alert_filename + "\""]]
- self.nodes = start_nodes(self.num_nodes, self.options.tmpdir, self.extra_args)
+ self.setup_nodes()
# Send numblocks blocks via peer with nVersionToUse set.
def send_blocks_with_version(self, peer, numblocks, nVersionToUse):