mining: use steady clock for waitNext timeout #36870

pull ViniciusCestarii wants to merge 1 commits into bitcoin:master from ViniciusCestarii:waitnext-steady-clock changing 1 files +3 −3
  1. ViniciusCestarii commented at 1:04 PM on November 14, 2026: contributor

    Follow up suggested in #36791 (review).

    waitNext measures its timeout and 1-second fee tick with the wall clock, while waitTipChanged uses the steady clock. This means a wall clock jump changes how long waitNext waits, and it never times out while mocktime is frozen.

    Use the steady clock for the deadline and tick. NodeClock is kept only for the testnet 20-minute rule, which must compare node time with the tip's timestamp.

    With this change the following command fails in interface_ipc_mining.py until #36862 is merged, since it no longer hides the waitNext race fixed there:

    faketime --exclude-monotonic -f "+0 x0.1" build/test/functional/interface_ipc_mining.py
    
  2. mining: use steady clock for waitNext timeout a02c31ca22
  3. DrahtBot added the label Mining on Nov 14, 2026
  4. DrahtBot commented at 1:04 PM on November 14, 2026: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

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

    <!--006a51241073e994b41acfe9ec718e94-->

    External sites

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

    See the guideline and AI policy for information on the review process.

    Type Reviewers
    ACK nervana21
    Concept ACK w0xlt

    If your review is incorrectly listed, please copy-paste <code>&lt;!--meta-tag:bot-skip--&gt;</code> into the comment that the bot should ignore.

    <!--5faf32d7da4f0f540f40219e4f7537a3-->

  5. nervana21 commented at 1:09 PM on November 14, 2026: contributor

    Concept ACK

  6. w0xlt commented at 8:29 PM on November 16, 2026: contributor

    Concept ACK

  7. nervana21 commented at 11:41 PM on November 17, 2026: contributor

    tACK a02c31ca22e7c76fdd737d36b16140bbb618c140

    Nit. #36862 has been merged, so a rebase and/or a description tweak would ease review.


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-11-18 16:51 UTC

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