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

    • #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 added the label Needs rebase on May 6, 2022
  9. DrahtBot commented at 10:55 am on May 6, 2022: member

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

    Want to unsubscribe from rebase notifications on this pull request? Just convert this pull request to a “draft”.

  10. mruddy commented at 12:11 pm on May 21, 2022: contributor
    closing since there appears to be no interest in this set of changes
  11. mruddy closed this on May 21, 2022

  12. mruddy deleted the branch on May 21, 2022
  13. DrahtBot 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: 2024-11-21 09:12 UTC

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