Call CHECK_NONFATAL only once where needed #24956

pull MarcoFalke wants to merge 1 commits into bitcoin:master from MarcoFalke:2204-once-check-tip-🦅 changing 1 files +10 −11
  1. MarcoFalke commented at 10:29 AM on April 24, 2022: member

    Now that CHECK_NONFATAL is the identity function starting with commit b1c5991eebb916755be188f355ad36fe01a3f529, it can be called less often in places where it was called more than once on the same value.

  2. MarcoFalke added the label Refactoring on Apr 24, 2022
  3. DrahtBot commented at 1:09 AM on April 25, 2022: contributor

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

    • #24595 (deploymentstatus: move g_versionbitscache global to ChainstateManager by ajtowns)

    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 cross-referenced this on Apr 25, 2022 from issue deploymentstatus: move g_versionbitscache global to ChainstateManager by ajtowns
  5. vincenzopalazzo approved
  6. DrahtBot cross-referenced this on Apr 26, 2022 from issue Improve Indices on pruned nodes via prune blockers by fjahr
  7. DrahtBot added the label Needs rebase on Apr 26, 2022
  8. Call CHECK_NONFATAL only once where needed fab34d392c
  9. MarcoFalke force-pushed on Apr 27, 2022
  10. MarcoFalke commented at 11:37 AM on April 27, 2022: member

    Rebased

  11. DrahtBot removed the label Needs rebase on Apr 27, 2022
  12. in src/rpc/blockchain.cpp:1210 in fab34d392c
    1212 | -    obj.pushKV("time", (int64_t)tip->nTime);
    1213 | -    obj.pushKV("mediantime", (int64_t)tip->GetMedianTimePast());
    1214 | -    obj.pushKV("verificationprogress", GuessVerificationProgress(Params().TxData(), tip));
    1215 | +    obj.pushKV("bestblockhash", tip.GetBlockHash().GetHex());
    1216 | +    obj.pushKV("difficulty", GetDifficulty(&tip));
    1217 | +    obj.pushKV("time", int64_t{tip.nTime});
    


    jonatack commented at 4:19 PM on April 28, 2022:
        obj.pushKV("time", tip.GetBlockTime());
    

    MarcoFalke commented at 6:05 PM on April 28, 2022:

    Thx. I'll leave this for the next force push, if there is one, or a follow-up.


    jonatack commented at 6:29 PM on April 28, 2022:

    Sure, I'll update #25016 based on this and add it there.

  13. jonatack commented at 4:23 PM on April 28, 2022: contributor

    Review ACK fab34d392ca415c27605040dc0fc738016c9a0ca

  14. jonatack cross-referenced this on Apr 28, 2022 from issue refactor: GetFirstStoredBlock() and getblockchaininfo follow-ups by jonatack
  15. MarcoFalke merged this on Apr 28, 2022
  16. MarcoFalke closed this on Apr 28, 2022

  17. MarcoFalke deleted the branch on Apr 28, 2022
  18. fanquake referenced this in commit 194b414697 on Apr 29, 2022
  19. sidhujag referenced this in commit e7101369dd on Apr 29, 2022
  20. sidhujag referenced this in commit cd0f3ec4a9 on Apr 29, 2022
  21. Fabcien referenced this in commit 1203360d8a on Feb 14, 2023
  22. bitcoin locked this on Apr 28, 2023

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-05-20 06:53 UTC