refactor: update CBlockIndex::nChainTx to be uint64_t #24912

pull mruddy wants to merge 1 commits into bitcoin:master from mruddy:nchaintx_type changing 6 files +14 −18
  1. mruddy commented at 8:53 PM on April 18, 2022: contributor

    There was a comment with the CBlockIndex::nChainTx data member: "Change to 64-bit type before 2024 (assuming worst case of 60 byte transactions)."

    As of when this PR was created, there were only around 750,000,000 transactions in the main best chain. That's only in the ballpark of 20% of the range of a 32-bit unsigned int. So, you might think that this is early. But, since I was looking up the references and already doing most of the work, I figured that I'd propose it now. In the least this commit resolves and removes a comment that might otherwise scare more people into doing the same research that I did, thus saving people time.

    I went through all the references to this member and made updates to make the data types line up better where there were differences.

    I also removed a small amount of dead code from SnapshotMetadata, see (https://github.com/bitcoin/bitcoin/pull/21681#issue-858110318).

  2. refactor: update CBlockIndex::nChainTx to be uint64_t
    There was a comment with this data member: "Change to 64-bit type before 2024 (assuming worst case of 60 byte transactions)."
    As of when this PR was created, there were only around 750,000,000 transactions in the best chain.
    I went through all the references to this member and made updates to make the data types line up better where there were differences.
    877458f3a2
  3. mruddy force-pushed on Apr 18, 2022
  4. DrahtBot added the label Refactoring on Apr 18, 2022
  5. DrahtBot added the label RPC/REST/ZMQ on Apr 18, 2022
  6. DrahtBot added the label Validation on Apr 18, 2022
  7. DrahtBot commented at 2:07 AM on April 19, 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:

    • #24952 (rpc: Add sqlite format option for dumptxoutset by dunxen)
    • #24804 (Sanity assert GetAncestor() != nullptr where appropriate by aureleoules)
    • #21603 (log: Mitigate disk filling attacks by rate limiting LogPrintf by dergoegge)

    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.

  8. DrahtBot cross-referenced this on Apr 20, 2022 from issue log: Mitigate disk filling attacks by rate limiting LogPrintf by dergoegge
  9. DrahtBot cross-referenced this on Apr 24, 2022 from issue rpc: Add sqlite format option for dumptxoutset by dunxen
  10. DrahtBot cross-referenced this on Apr 26, 2022 from issue Sanity assert GetAncestor() != nullptr where appropriate by aureleoules
  11. DrahtBot added the label Needs rebase on May 6, 2022
  12. DrahtBot commented at 10:55 AM on May 6, 2022: contributor

    <!--cf906140f33d8803c4a75a2196329ecb-->

    🐙 This pull request conflicts with the target branch and needs rebase.

    <sub>Want to unsubscribe from rebase notifications on this pull request? Just convert this pull request to a "draft".</sub>

  13. mruddy commented at 12:11 PM on May 21, 2022: contributor

    closing since there appears to be no interest in this set of changes

  14. mruddy closed this on May 21, 2022

  15. mruddy deleted the branch on May 21, 2022
  16. bitcoin locked this on May 21, 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