refactor: Move GuessVerificationProgress into ChainstateManager #31393

pull maflcko wants to merge 1 commits into bitcoin:master from maflcko:2411-mv-gvp changing 5 files +22 −21
  1. maflcko commented at 9:40 am on November 29, 2024: member
    Currently the function is standalone, which means any passed-in data like TxData or the block pointer needs to be taken from the ChainstateManager and passed in. This is currently verbose and may become even more verbose if the function is reworked in the future. As the function can not be called without a ChainstateManager in production code anyway, make it a member function on the class.
  2. DrahtBot commented at 9:40 am on November 29, 2024: contributor

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

    Code Coverage & Benchmarks

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

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    Concept ACK mzumsande
    Stale ACK danielabrozzoni

    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:

    • #31346 (Set notifications m_tip_block in LoadChainTip() by Sjors)
    • #31177 (rpc, logging: return “verificationprogress” of 1 when up to date by polespinasa)

    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.

  3. DrahtBot added the label Refactoring on Nov 29, 2024
  4. danielabrozzoni approved
  5. danielabrozzoni commented at 7:07 pm on December 2, 2024: contributor
    light tACK fa5ad4ed2b36fa483385670a210eb8564bc53c9b - i’m not too familiar with the code, but the change is reasonable. Tests are passing locally.
  6. in src/validation.cpp:2969 in fa5ad4ed2b outdated
    2962@@ -2963,6 +2963,7 @@ void Chainstate::PruneAndFlush()
    2963 }
    2964 
    2965 static void UpdateTipLog(
    2966+    const ChainstateManager& chainman,
    2967     const CCoinsViewCache& coins_tip,
    2968     const CBlockIndex* tip,
    2969     const CChainParams& params,
    


    mzumsande commented at 8:52 pm on December 2, 2024:
    can remove params, it’s no longer used

    maflcko commented at 9:37 am on December 3, 2024:
    Thanks, done
  7. mzumsande commented at 11:10 pm on December 2, 2024: contributor
    Concept ACK
  8. refactor: Move GuessVerificationProgress into ChainstateManager 5555ed0c3b
  9. maflcko force-pushed on Dec 3, 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-03 21:12 UTC

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