refactor: [test] Remove deprecated SetMockTime(i64) alias #36063

pull maflcko wants to merge 2 commits into bitcoin:master from maflcko:2608-test-time-remove-depr changing 7 files +6 −15
  1. maflcko commented at 10:34 AM on August 24, 2026: member

    The deprecated test-only alias is only used in a few places and required in none.

    In fact, it is incorrectly used in two unit tests, so first fixup those, and then remove it.

  2. test: refactor: Use FakeNodeClock over manual/global SetMockTime
    Using SetMockTime in tests is problematic, because it often requires
    verbose calls to
    `SetMockTime(GetTime<std::chrono::seconds>() + offset)`.
    Also, it requires manual `SetMockTime(0);` at the end.
    
    Fix both issues by using FakeNodeClock.
    faf87c3535
  3. util: refactor: Remove deprecated SetMockTime(i64) alias
    The deprecated test-only alias is only used in three places and required
    in none.
    
    So remove it.
    fad1e6bf23
  4. DrahtBot renamed this:
    refactor: [test] Remove deprecated SetMockTime(i64) alias
    refactor: [test] Remove deprecated SetMockTime(i64) alias
    on Aug 24, 2026
  5. DrahtBot added the label Refactoring on Aug 24, 2026
  6. DrahtBot commented at 10:35 AM on August 24, 2026: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

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

    <!--006a51241073e994b41acfe9ec718e94-->

    Code Coverage & Benchmarks

    For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/36063.

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

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

    Type Reviewers
    ACK rustaceanrob

    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-->

  7. rustaceanrob commented at 11:32 AM on August 24, 2026: member

    ACK fad1e6bf238ef4693464faf4102934c5b2dc7cb2

  8. fanquake merged this on Aug 24, 2026
  9. fanquake closed this on Aug 24, 2026

  10. maflcko deleted the branch on Aug 24, 2026

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-09-09 07:56 UTC