mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-07-01 19:21:28 +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:
@ -17,7 +17,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 __init__(self):
|
||||
super().__init__()
|
||||
self.block_receive_map = defaultdict(int)
|
||||
@ -55,7 +55,7 @@ class MaxUploadTest(BitcoinTestFramework):
|
||||
p2p_conns = []
|
||||
|
||||
for _ in range(3):
|
||||
p2p_conns.append(self.nodes[0].add_p2p_connection(TestNode()))
|
||||
p2p_conns.append(self.nodes[0].add_p2p_connection(TestP2PConn()))
|
||||
|
||||
network_thread_start()
|
||||
for p2pc in p2p_conns:
|
||||
@ -147,7 +147,7 @@ class MaxUploadTest(BitcoinTestFramework):
|
||||
self.start_node(0, ["-whitelist=127.0.0.1", "-maxuploadtarget=1", "-blockmaxsize=999000"])
|
||||
|
||||
# Reconnect to self.nodes[0]
|
||||
self.nodes[0].add_p2p_connection(TestNode())
|
||||
self.nodes[0].add_p2p_connection(TestP2PConn())
|
||||
|
||||
network_thread_start()
|
||||
self.nodes[0].p2p.wait_for_verack()
|
||||
|
Reference in New Issue
Block a user