aboutsummaryrefslogtreecommitdiff
path: root/test/functional/p2p-compactblocks.py
diff options
context:
space:
mode:
authorJohn Newbery <john@johnnewbery.com>2017-08-24 15:36:02 -0400
committerJohn Newbery <john@johnnewbery.com>2017-11-08 09:32:04 -0500
commit32ae82f5c3d51a66ad4deb84819809b890664245 (patch)
tree23e83cfed1f974a3a21df022ec1f207eeb645dae /test/functional/p2p-compactblocks.py
parent5e5725cc2b56d66510fd85d7ee3822e6df43cd24 (diff)
[tests] use TestNode p2p connection in tests
Diffstat (limited to 'test/functional/p2p-compactblocks.py')
-rwxr-xr-xtest/functional/p2p-compactblocks.py17
1 files changed, 3 insertions, 14 deletions
diff --git a/test/functional/p2p-compactblocks.py b/test/functional/p2p-compactblocks.py
index e3f986d80b..d2c4d39305 100755
--- a/test/functional/p2p-compactblocks.py
+++ b/test/functional/p2p-compactblocks.py
@@ -788,23 +788,12 @@ class CompactBlocksTest(BitcoinTestFramework):
def run_test(self):
# Setup the p2p connections and start up the network thread.
- self.test_node = TestNode()
- self.segwit_node = TestNode()
- self.old_node = TestNode() # version 1 peer <--> segwit node
-
- connections = []
- connections.append(NodeConn('127.0.0.1', p2p_port(0), self.nodes[0], self.test_node))
- connections.append(NodeConn('127.0.0.1', p2p_port(1), self.nodes[1],
- self.segwit_node, services=NODE_NETWORK|NODE_WITNESS))
- connections.append(NodeConn('127.0.0.1', p2p_port(1), self.nodes[1],
- self.old_node, services=NODE_NETWORK))
- self.test_node.add_connection(connections[0])
- self.segwit_node.add_connection(connections[1])
- self.old_node.add_connection(connections[2])
+ self.test_node = self.nodes[0].add_p2p_connection(TestNode())
+ self.segwit_node = self.nodes[1].add_p2p_connection(TestNode(), services=NODE_NETWORK|NODE_WITNESS)
+ self.old_node = self.nodes[1].add_p2p_connection(TestNode(), services=NODE_NETWORK)
NetworkThread().start() # Start up network handling in another thread
- # Test logic begins here
self.test_node.wait_for_verack()
# We will need UTXOs to construct transactions in later tests.