mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-06-29 10:19:26 +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:
@ -27,7 +27,7 @@ from test_framework.mininode import *
|
||||
from test_framework.test_framework import BitcoinTestFramework
|
||||
from test_framework.util import *
|
||||
|
||||
class TestNode(P2PInterface):
|
||||
class TestP2PConn(P2PInterface):
|
||||
def on_version(self, message):
|
||||
# Don't send a verack in response
|
||||
pass
|
||||
@ -39,9 +39,9 @@ class TimeoutsTest(BitcoinTestFramework):
|
||||
|
||||
def run_test(self):
|
||||
# Setup the p2p connections and start up the network thread.
|
||||
no_verack_node = self.nodes[0].add_p2p_connection(TestNode())
|
||||
no_version_node = self.nodes[0].add_p2p_connection(TestNode(), send_version=False)
|
||||
no_send_node = self.nodes[0].add_p2p_connection(TestNode(), send_version=False)
|
||||
no_verack_node = self.nodes[0].add_p2p_connection(TestP2PConn())
|
||||
no_version_node = self.nodes[0].add_p2p_connection(TestP2PConn(), send_version=False)
|
||||
no_send_node = self.nodes[0].add_p2p_connection(TestP2PConn(), send_version=False)
|
||||
|
||||
network_thread_start()
|
||||
|
||||
|
Reference in New Issue
Block a user