Remove broken and unused CDataStream methods #24253

pull MarcoFalke wants to merge 3 commits into bitcoin:master from MarcoFalke:2202-s changing 3 files +17 −138
  1. MarcoFalke commented at 7:01 pm on February 3, 2022: member

    The insert and erase methods have many issues:

    • They are unused
    • They are confusing and hard to read, as they implement “special cases” for optimization, that isn’t needed
    • They are broken (See #24231)
    • Fixing them leads to mingw compile errors (See #24231 (comment))

    Fix all issues by removing them

  2. test: Inline expected_xor fa71114926
  3. test: Create fresh CDataStream each time
    Can be reviewed with --ignore-all-space
    faee5f8dc2
  4. Remove broken and unused CDataStream methods fa1b227a72
  5. MarcoFalke force-pushed on Feb 3, 2022
  6. MarcoFalke added the label Refactoring on Feb 3, 2022
  7. DrahtBot commented at 3:37 am on February 4, 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:

    • #24231 (streams: Fix read-past-the-end and integer overflows by MarcoFalke)

    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. luke-jr approved
  9. luke-jr commented at 6:15 pm on February 7, 2022: member

    ACK, though I’d put the first commit last so the other two can be backported* cleaner.

    Also confirmed 21.x doesn’t use these functions either, so a real fix isn’t needed either.

    * I don’t see a need to backport them, though.

  10. MarcoFalke commented at 8:35 am on February 8, 2022: member

    I don’t see a need to backport them, though.

    Indeed, there is no need to backport, so I am going to leave as is for now.

  11. laanwj commented at 2:18 pm on February 9, 2022: member
    Code review ACK fa1b227a727a5056c6fbc7e4f33c19aeb5207718 Nice cleanup!
  12. laanwj merged this on Feb 9, 2022
  13. laanwj closed this on Feb 9, 2022

  14. MarcoFalke deleted the branch on Feb 9, 2022
  15. sidhujag referenced this in commit e7195b437a on Feb 12, 2022
  16. DrahtBot locked this on Feb 9, 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-17 12:12 UTC

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