aboutsummaryrefslogtreecommitdiff
path: root/test/functional/test_framework
diff options
context:
space:
mode:
authorJohn Newbery <john@johnnewbery.com>2018-02-07 09:22:58 -0500
committerJohn Newbery <john@johnnewbery.com>2018-03-19 14:58:00 -0400
commit728667b771e80388812d521eca03682c9366ce4b (patch)
tree0f0be9bb146364d2fd94251636cbae6ffade5c22 /test/functional/test_framework
parentee7b67e2784a5f08dffa6b05cee0e64c53a693c8 (diff)
downloadbitcoin-728667b771e80388812d521eca03682c9366ce4b.tar.xz
scripted-diff: rename TestNode to TestP2PConn in tests
Several test scripts define a subclass of P2PInterface called TestNode. This commit renames those to TestP2PConn since we already have a TestNode class in the test framework. -BEGIN VERIFY SCRIPT- sed -i s/TestNode/TestP2PConn/ test/functional/*py test/functional/test_framework/comptool.py _END VERIFY SCRIPT-
Diffstat (limited to 'test/functional/test_framework')
-rwxr-xr-xtest/functional/test_framework/comptool.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/functional/test_framework/comptool.py b/test/functional/test_framework/comptool.py
index 61ea2280e2..e0ca78e5d1 100755
--- a/test/functional/test_framework/comptool.py
+++ b/test/functional/test_framework/comptool.py
@@ -8,7 +8,7 @@ To use, create a class that implements get_tests(), and pass it in
as the test generator to TestManager. get_tests() should be a python
generator that returns TestInstance objects. See below for definition.
-TestNode behaves as follows:
+TestP2PConn behaves as follows:
Configure with a BlockStore and TxStore
on_inv: log the message but don't request
on_headers: log the chain tip
@@ -39,7 +39,7 @@ class RejectResult():
def __repr__(self):
return '%i:%s' % (self.code,self.reason or '*')
-class TestNode(P2PInterface):
+class TestP2PConn(P2PInterface):
def __init__(self, block_store, tx_store):
super().__init__()
@@ -170,7 +170,7 @@ class TestManager():
def add_all_connections(self, nodes):
for i in range(len(nodes)):
# Create a p2p connection to each node
- node = TestNode(self.block_store, self.tx_store)
+ node = TestP2PConn(self.block_store, self.tx_store)
node.peer_connect('127.0.0.1', p2p_port(i))
self.p2p_connections.append(node)