mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-06-30 02:31:05 +02:00
test: Use connect_nodes when connecting nodes in the test_framework
This commit is contained in:
@ -5,9 +5,15 @@
|
||||
"""Test the listsincelast RPC."""
|
||||
|
||||
from test_framework.test_framework import BitcoinTestFramework
|
||||
from test_framework.util import assert_equal, assert_array_result, assert_raises_rpc_error
|
||||
from test_framework.util import (
|
||||
assert_array_result,
|
||||
assert_equal,
|
||||
assert_raises_rpc_error,
|
||||
connect_nodes,
|
||||
)
|
||||
|
||||
class ListSinceBlockTest (BitcoinTestFramework):
|
||||
|
||||
class ListSinceBlockTest(BitcoinTestFramework):
|
||||
def set_test_params(self):
|
||||
self.num_nodes = 4
|
||||
self.setup_clean_chain = True
|
||||
@ -16,6 +22,9 @@ class ListSinceBlockTest (BitcoinTestFramework):
|
||||
self.skip_if_no_wallet()
|
||||
|
||||
def run_test(self):
|
||||
# All nodes are in IBD from genesis, so they'll need the miner (node2) to be an outbound connection, or have
|
||||
# only one connection. (See fPreferredDownload in net_processing)
|
||||
connect_nodes(self.nodes[1], 2)
|
||||
self.nodes[2].generate(101)
|
||||
self.sync_all()
|
||||
|
||||
|
Reference in New Issue
Block a user