0
0
Fork 0
mirror of https://github.com/bitcoin/bitcoin.git synced 2025-03-05 14:06:27 -05:00

test: Avoid redundant stop and error spam on startup failure

Trying to immediately shut down a node after a startup failure without
waiting for the RPC to be fully up will in most cases just fail and lead
to an RPC error.

Also, it is confusing to sidestep the existing fallback to kill any
leftover nodes on a test failure.

So just rely on the fallback.
This commit is contained in:
MarcoFalke 2025-01-08 11:06:56 +01:00
parent fa0dc09b90
commit fae3bf6b87
No known key found for this signature in database

View file

@ -567,15 +567,10 @@ class BitcoinTestFramework(metaclass=BitcoinTestMetaClass):
if extra_args is None:
extra_args = [None] * self.num_nodes
assert_equal(len(extra_args), self.num_nodes)
try:
for i, node in enumerate(self.nodes):
node.start(extra_args[i], *args, **kwargs)
for node in self.nodes:
node.wait_for_rpc_connection()
except Exception:
# If one node failed to start, stop the others
self.stop_nodes()
raise
for i, node in enumerate(self.nodes):
node.start(extra_args[i], *args, **kwargs)
for node in self.nodes:
node.wait_for_rpc_connection()
if self.options.coveragedir is not None:
for node in self.nodes: