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

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

    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. vincenzopalazzo approved
  5. DrahtBot added the label Needs rebase on Apr 26, 2022
  6. Call CHECK_NONFATAL only once where needed fab34d392c
  7. MarcoFalke force-pushed on Apr 27, 2022
  8. MarcoFalke commented at 11:37 am on April 27, 2022: member
    Rebased
  9. DrahtBot removed the label Needs rebase on Apr 27, 2022
  10. 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:
    0    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.
  11. jonatack commented at 4:23 pm on April 28, 2022: member
    Review ACK fab34d392ca415c27605040dc0fc738016c9a0ca
  12. MarcoFalke merged this on Apr 28, 2022
  13. MarcoFalke closed this on Apr 28, 2022

  14. MarcoFalke deleted the branch on Apr 28, 2022
  15. fanquake referenced this in commit 194b414697 on Apr 29, 2022
  16. sidhujag referenced this in commit e7101369dd on Apr 29, 2022
  17. sidhujag referenced this in commit cd0f3ec4a9 on Apr 29, 2022
  18. Fabcien referenced this in commit 1203360d8a on Feb 14, 2023
  19. DrahtBot 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: 2024-09-29 04:12 UTC

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