aboutsummaryrefslogtreecommitdiff
path: root/test/functional/test_framework
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2021-12-10 10:02:03 +0100
committerMarcoFalke <falke.marco@gmail.com>2021-12-10 10:02:12 +0100
commit9f7661c0c4cbed06c558c2c8688c0a7286c5a6e2 (patch)
tree7d34ed083d7b9d323d515f516cec7087df4d881e /test/functional/test_framework
parentd5724b8c6a1f542edc0b02b6bd069121e2cd2542 (diff)
parentfadc0c80ae4e526fb2b503f7cc02f6122aaf1de5 (diff)
downloadbitcoin-9f7661c0c4cbed06c558c2c8688c0a7286c5a6e2.tar.xz
Merge bitcoin/bitcoin#19499: p2p: Make timeout mockable and type safe, speed up test
fadc0c80ae4e526fb2b503f7cc02f6122aaf1de5 p2p: Make timeout mockable and type safe, speed up test (MarcoFalke) fa6d5a238d2c94440105ddd4f1554f85659d6c5b scripted-diff: Rename m_last_send and m_last_recv (MarcoFalke) Pull request description: Use type-safe time for better code readability/maintainability and mockable time for better testability. This speeds up the p2p_timeout test. This is also a bugfix for intermittent test issues like: https://cirrus-ci.com/task/4769904156999680?command=ci#L2836 Fixes #20654 ACKs for top commit: laanwj: Code review ACK fadc0c80ae4e526fb2b503f7cc02f6122aaf1de5 naumenkogs: ACK fadc0c80ae4e526fb2b503f7cc02f6122aaf1de5 Tree-SHA512: 28c6544c97f188c8a0fbc80411c74ab74ffd055885322c325aa3d1c404b29c3fd70a737e86083eecae58ef394db1cb56bc122d06cff63742aa89a8e868730c64
Diffstat (limited to 'test/functional/test_framework')
-rw-r--r--test/functional/test_framework/util.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/functional/test_framework/util.py b/test/functional/test_framework/util.py
index c3a9029d55..195af14914 100644
--- a/test/functional/test_framework/util.py
+++ b/test/functional/test_framework/util.py
@@ -379,10 +379,10 @@ def write_config(config_path, *, n, chain, extra_config="", disable_autoconnect=
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 overridden in
- # tests.
- f.write("peertimeout=999999\n")
+ # peertimeout is measured in mock time, so setting it large enough to
+ # cover any duration in mock time is sufficient. It can be overridden
+ # in tests.
+ f.write("peertimeout=999999999\n")
f.write("printtoconsole=0\n")
f.write("upnp=0\n")
f.write("natpmp=0\n")