mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-07-12 23:46:54 +02:00
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-
This commit is contained in:
@ -14,8 +14,8 @@ from test_framework.util import *
|
||||
from test_framework.blocktools import create_block, create_coinbase, add_witness_commitment
|
||||
from test_framework.script import CScript, OP_TRUE
|
||||
|
||||
# TestNode: A peer we use to send messages to bitcoind, and store responses.
|
||||
class TestNode(P2PInterface):
|
||||
# TestP2PConn: A peer we use to send messages to bitcoind, and store responses.
|
||||
class TestP2PConn(P2PInterface):
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
self.last_sendcmpct = []
|
||||
@ -788,9 +788,9 @@ class CompactBlocksTest(BitcoinTestFramework):
|
||||
|
||||
def run_test(self):
|
||||
# Setup the p2p connections and start up the network thread.
|
||||
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)
|
||||
self.test_node = self.nodes[0].add_p2p_connection(TestP2PConn())
|
||||
self.segwit_node = self.nodes[1].add_p2p_connection(TestP2PConn(), services=NODE_NETWORK|NODE_WITNESS)
|
||||
self.old_node = self.nodes[1].add_p2p_connection(TestP2PConn(), services=NODE_NETWORK)
|
||||
|
||||
network_thread_start()
|
||||
|
||||
|
Reference in New Issue
Block a user