diff options
author | MarcoFalke <falke.marco@gmail.com> | 2021-09-13 09:48:59 +0200 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2021-09-13 09:41:58 +0200 |
commit | fad4f4464583e3c26c95c2c301f39df6b3dcf6c7 (patch) | |
tree | f1bcb7a906d2ddfb6a0c4dbb859c269f11ba7c38 /test/functional/test_framework | |
parent | 053a5fc7d912d597cd6dc7376b479420d1eae1c0 (diff) | |
download | bitcoin-fad4f4464583e3c26c95c2c301f39df6b3dcf6c7.tar.xz |
test: Set peertimeout in write_config
This avoids having to remember to set it whenever mocktime is used with
peer connections. Also, it might help avoiding disconnects when
attaching a debugger to a running test.
Diffstat (limited to 'test/functional/test_framework')
-rw-r--r-- | test/functional/test_framework/util.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/functional/test_framework/util.py b/test/functional/test_framework/util.py index ec27fd7f85..d66499dbcb 100644 --- a/test/functional/test_framework/util.py +++ b/test/functional/test_framework/util.py @@ -364,6 +364,11 @@ def write_config(config_path, *, n, chain, extra_config="", disable_autoconnect= f.write("dnsseed=0\n") f.write("fixedseeds=0\n") f.write("listenonion=0\n") + # Increase peertimeout to avoid disconnects while using mocktime. + # peertimeout is measured in wall clock time, so setting it to the + # duration of the longest test is sufficient. It can be overriden in + # tests. + f.write("peertimeout=999999\n") f.write("printtoconsole=0\n") f.write("upnp=0\n") f.write("natpmp=0\n") |