mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-06-30 10:42:23 +02:00
p2p: Make timeout mockable and type safe, speed up test
This commit is contained in:
@ -378,10 +378,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")
|
||||
|
Reference in New Issue
Block a user