From eed6aa8059b56cf3d0cece7641f82fdeae8e24da Mon Sep 17 00:00:00 2001 From: Matt Whitlock Date: Sat, 23 Aug 2025 07:50:04 -0400 Subject: [PATCH] pyln-testing: pass timeout to BitcoinProxy The bitcoin.rpc.DEFAULT_HTTP_TIMEOUT of 30 seconds may not be enough time to generate a block when the test machine is under load. Pass pyln.testing.utils.TIMEOUT to bitcoin.rpc.RawProxy to allow extra time: currently 60 seconds by default or 180 seconds if SLOW_MACHINE is set. Changelog-None --- contrib/pyln-testing/pyln/testing/utils.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/contrib/pyln-testing/pyln/testing/utils.py b/contrib/pyln-testing/pyln/testing/utils.py index 2317c96c315f..15718a66d838 100644 --- a/contrib/pyln-testing/pyln/testing/utils.py +++ b/contrib/pyln-testing/pyln/testing/utils.py @@ -364,8 +364,9 @@ class SimpleBitcoinProxy: throwaway connections. This is easier than to reach into the RPC library to close, reopen and reauth upon failure. """ - def __init__(self, btc_conf_file, *args, **kwargs): + def __init__(self, btc_conf_file, timeout=TIMEOUT, *args, **kwargs): self.__btc_conf_file__ = btc_conf_file + self.__timeout__ = timeout def __getattr__(self, name): if name.startswith('__') and name.endswith('__'): @@ -373,7 +374,8 @@ def __getattr__(self, name): raise AttributeError # Create a callable to do the actual call - proxy = BitcoinProxy(btc_conf_file=self.__btc_conf_file__) + proxy = BitcoinProxy(btc_conf_file=self.__btc_conf_file__, + timeout=self.__timeout__) def f(*args): logging.debug("Calling {name} with arguments {args}".format(