test: Set TestNode url field early, so that feature_loadblock.py --usecli works

This commit is contained in:
MarcoFalke
2026-05-22 16:38:35 +02:00
parent 9f7b08c61c
commit fa4fc8c1d7
2 changed files with 1 additions and 2 deletions

View File

@@ -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)

View File

@@ -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.