test: Set peertimeout in write_config #22960

pull MarcoFalke wants to merge 1 commits into bitcoin:master from MarcoFalke:2109-testPeerTimeout changing 4 files +6 −6
  1. MarcoFalke commented at 7:44 AM on September 13, 2021: member

    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.

  2. 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.
    fad4f44645
  3. fanquake added the label Tests on Sep 13, 2021
  4. fanquake commented at 7:47 AM on September 13, 2021: member

    Concept ACK

  5. DrahtBot commented at 8:38 PM on September 13, 2021: member

    <!--e57a25ab6845829454e8d69fc972939a-->

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    <!--174a7506f384e20aa4161008e828411d-->

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #22818 (test: Activate all regtest softforks at height 1, unless overridden by MarcoFalke)

    If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

  6. theStack commented at 3:40 PM on September 14, 2021: member

    Concept ACK

  7. laanwj commented at 1:56 PM on September 16, 2021: member

    Concept and code review ACK fad4f4464583e3c26c95c2c301f39df6b3dcf6c7

  8. laanwj merged this on Sep 16, 2021
  9. laanwj closed this on Sep 16, 2021

  10. laanwj commented at 2:02 PM on September 16, 2021: member

    This does show that we apparently have no test for peertimeout. Eh that's wrong, there's p2p_timeouts.py and p2p_ping.py, but it's already overridden there.

  11. MarcoFalke deleted the branch on Sep 16, 2021
  12. sidhujag referenced this in commit dd0aab202e on Sep 19, 2021
  13. in test/functional/test_framework/util.py:369 in fad4f44645
     363 | @@ -364,6 +364,11 @@ def write_config(config_path, *, n, chain, extra_config="", disable_autoconnect=
     364 |          f.write("dnsseed=0\n")
     365 |          f.write("fixedseeds=0\n")
     366 |          f.write("listenonion=0\n")
     367 | +        # Increase peertimeout to avoid disconnects while using mocktime.
     368 | +        # peertimeout is measured in wall clock time, so setting it to the
     369 | +        # duration of the longest test is sufficient. It can be overriden in
    


    hebasto commented at 8:54 AM on September 25, 2021:

    typo: overriden ==> overridden

  14. Fabcien referenced this in commit 4ac9737a71 on Feb 2, 2022
  15. DrahtBot locked this on Oct 30, 2022

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-17 06:14 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me