mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-05-27 22:34:18 +02:00
test: Set TestNode url field early, so that feature_loadblock.py --usecli works
This commit is contained in:
@@ -25,7 +25,6 @@ class LoadblockTest(BitcoinTestFramework):
|
||||
def set_test_params(self):
|
||||
self.setup_clean_chain = True
|
||||
self.num_nodes = 2
|
||||
self.supports_cli = False
|
||||
|
||||
def run_test(self):
|
||||
self.nodes[1].setnetworkactive(state=False)
|
||||
|
||||
@@ -379,11 +379,11 @@ class TestNode():
|
||||
self.log.debug("RPC successfully started")
|
||||
# Set rpc_connected even if we are in use_cli mode so that we know we can call self.stop() if needed.
|
||||
self.rpc_connected = True
|
||||
self.url = rpc.rpc_url
|
||||
self.cli = self.create_new_rpc_connection(mode="CLI")
|
||||
if self.use_cli:
|
||||
return
|
||||
self._rpc = rpc
|
||||
self.url = self._rpc.rpc_url
|
||||
return
|
||||
except JSONRPCException as e:
|
||||
# Suppress these as they are expected during initialization.
|
||||
|
||||
Reference in New Issue
Block a user