[tests] Rename NodeConn and NodeConnCB

NodeConn -> P2PConnection
NodeConnCB -> P2PInterface
This commit is contained in:
John Newbery
2017-10-17 16:16:39 -04:00
parent 9f2c2dba21
commit 873beca6de
18 changed files with 50 additions and 55 deletions

View File

@@ -7,7 +7,7 @@
Setup: two nodes, node0+node1, not connected to each other. Node1 will have
nMinimumChainWork set to 0x10, so it won't process low-work unrequested blocks.
We have one NodeConn connection to node0 called test_node, and one to node1
We have one P2PInterface connection to node0 called test_node, and one to node1
called min_work_node.
The test:
@@ -79,9 +79,9 @@ class AcceptBlockTest(BitcoinTestFramework):
def run_test(self):
# Setup the p2p connections and start up the network thread.
# test_node connects to node0 (not whitelisted)
test_node = self.nodes[0].add_p2p_connection(NodeConnCB())
# min_work_node connects to node1
min_work_node = self.nodes[1].add_p2p_connection(NodeConnCB())
test_node = self.nodes[0].add_p2p_connection(P2PInterface())
# min_work_node connects to node1 (whitelisted)
min_work_node = self.nodes[1].add_p2p_connection(P2PInterface())
NetworkThread().start() # Start up network handling in another thread
@@ -207,7 +207,7 @@ class AcceptBlockTest(BitcoinTestFramework):
# disconnect/reconnect first
self.nodes[0].disconnect_p2ps()
test_node = self.nodes[0].add_p2p_connection(NodeConnCB())
test_node = self.nodes[0].add_p2p_connection(P2PInterface())
test_node.wait_for_verack()
test_node.send_message(msg_block(block_h1f))
@@ -292,7 +292,7 @@ class AcceptBlockTest(BitcoinTestFramework):
test_node.wait_for_disconnect()
self.nodes[0].disconnect_p2ps()
test_node = self.nodes[0].add_p2p_connection(NodeConnCB())
test_node = self.nodes[0].add_p2p_connection(P2PInterface())
NetworkThread().start() # Start up network handling in another thread
test_node.wait_for_verack()