Reduce calls to various SetNull methods #27551

pull Bushstar wants to merge 1 commits into bitcoin:master from Bushstar:reduce-setnull changing 17 files +21 −54
  1. Bushstar commented at 11:02 am on May 2, 2023: contributor

    This PR aims to defaults initialise various class members and make redundant several calls to SetNull methods for those classes. This makes the default constructor for a few classes without any other constructors redundant as well but rather than remove them I’ll created them with default in case of compiler complaints.

    • Default initialise m_data member in base_blob which makes calls to SetNull on uint256 redundant, create base_blob() with default rather than remove in case of compiler complaints.
    • Default initialise members in CBlockFileInfo and remove constructor which called SetNull, create CBlockFileInfo() with default.
    • Default initialise members of CBlockHeader and remove constructor which called SetNull, create CBlockHeader() with default.
    • Default initialise fChecked member of CBlock and remove constructor which called SetNull as CBlockHeader no longer requires this call and the vtx member will already be clear. Create CBlock() with default.
    • Default initialise type in CInv and remove constructor which set type and called SetNull on the hash member. Create CInv() with default.
  2. Reduce calls to various SetNull methods 8f1f998440
  3. DrahtBot commented at 11:02 am on May 2, 2023: contributor

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

    Reviews

    See the guideline for information on the review process. A summary of reviews will appear here.

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #27929 (Added static_assert to check that base_blob is using whole bytes. by Brotcrunsher)

    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. glozow added the label Refactoring on May 8, 2023
  5. DrahtBot commented at 1:46 pm on June 27, 2023: contributor

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

  6. DrahtBot added the label Needs rebase on Jun 27, 2023
  7. DrahtBot commented at 6:22 am on July 24, 2023: contributor

    There hasn’t been much activity lately and the patch still needs rebase. What is the status here?

    • Is it still relevant? ➡️ Please solve the conflicts to make it ready for review and to ensure the CI passes.
    • Is it no longer relevant? ➡️ Please close.
    • Did the author lose interest or time to work on this? ➡️ Please close it and mark it ‘Up for grabs’ with the label, so that it can be picked up in the future.
  8. achow101 commented at 4:06 pm on September 20, 2023: member

    The PR didn’t seem to attract much attention in the past. Also, the issue seems not important enough right now to keep it sitting around idle in the list of open PRs.

    Closing due to lack of interest.

  9. achow101 closed this on Sep 20, 2023

  10. achow101 added the label Up for grabs on Sep 20, 2023
  11. maflcko removed the label Up for grabs on Oct 20, 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-06-29 10:13 UTC

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