refactor: Use type-safe time in txorphanage #30170

pull maflcko wants to merge 1 commits into bitcoin:master from maflcko:2405-type-time-tx-orphan changing 2 files +12 −10
  1. maflcko commented at 12:27 pm on May 24, 2024: member
    This allows to remove manual conversions like multiplication by 60, and uses a type-safe type instead of a raw int64_t.
  2. refactor: Use type-safe time in txorphanage fa6d4891c7
  3. DrahtBot commented at 12:27 pm on May 24, 2024: contributor

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

    Code Coverage

    For detailed information about the code coverage, see the test coverage report.

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK epiccurious, dergoegge, brunoerg
    Concept ACK stickies-v

    If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #30186 (fuzz: increase txorphan harness stability by marcofleon)
    • #29641 (scripted-diff: Use LogInfo/LogDebug over LogPrintf/LogPrint by maflcko)

    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.

  4. DrahtBot added the label Refactoring on May 24, 2024
  5. stickies-v commented at 1:28 pm on May 24, 2024: contributor
    Concept ACK
  6. epiccurious commented at 5:24 pm on May 24, 2024: none
    utACK fa6d4891c7815025ab1cd58d0906466af31bb648.
  7. DrahtBot requested review from stickies-v on May 24, 2024
  8. in src/txorphanage.cpp:122 in fa6d4891c7
    118@@ -118,12 +119,12 @@ void TxOrphanage::LimitOrphans(unsigned int max_orphans, FastRandomContext& rng)
    119     LOCK(m_mutex);
    120 
    121     unsigned int nEvicted = 0;
    122-    static int64_t nNextSweep;
    123-    int64_t nNow = GetTime();
    124+    static NodeSeconds nNextSweep;
    


    dergoegge commented at 8:49 am on May 28, 2024:
    Out of scope for this PR but this global is probably the source of instability in the txorphan harness.
  9. dergoegge approved
  10. dergoegge commented at 8:51 am on May 28, 2024: member
    Code review ACK fa6d4891c7815025ab1cd58d0906466af31bb648
  11. brunoerg approved
  12. brunoerg commented at 5:46 pm on May 28, 2024: contributor
    utACK fa6d4891c7815025ab1cd58d0906466af31bb648
  13. fanquake merged this on May 29, 2024
  14. fanquake closed this on May 29, 2024

  15. maflcko deleted the branch on May 29, 2024

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: 2024-12-23 03:12 UTC

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