You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
qa: Include ignored errors in RPC connection timeout
When an RPC connection attempt with bitcoind times out, include which ignored errors occurred in the exception message.
May provide clues of what has gone wrong.
# Suppress if cookie file isn't generated yet and no rpcuser or rpcpassword; bitcoind may be starting.
331
337
if"No RPC credentials"notinstr(e):
332
338
raise
339
+
suppressed_errors["missing_credentials"] +=1
340
+
latest_error=repr(e)
333
341
time.sleep(1.0/poll_per_s)
334
-
self._raise_assertion_error("Unable to connect to bitcoind after {}s".format(self.rpc_timeout))
342
+
self._raise_assertion_error(f"Unable to connect to bitcoind after {self.rpc_timeout}s (ignored errors: {str(dict(suppressed_errors))}, latest error: {latest_error})")
335
343
336
344
defwait_for_cookie_credentials(self):
337
345
"""Ensures auth cookie credentials can be read, e.g. for testing CLI with -rpcwait before RPC connection is up."""
0 commit comments