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

    • #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. DrahtBot cross-referenced this on Feb 4, 2022 from issue streams: Fix read-past-the-end and integer overflows by MarcoFalke
  9. luke-jr approved
  10. 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.

  11. 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.

  12. laanwj commented at 2:18 PM on February 9, 2022: member

    Code review ACK fa1b227a727a5056c6fbc7e4f33c19aeb5207718 Nice cleanup!

  13. laanwj merged this on Feb 9, 2022
  14. laanwj closed this on Feb 9, 2022

  15. MarcoFalke deleted the branch on Feb 9, 2022
  16. dhruv cross-referenced this on Feb 10, 2022 from issue BIP324: Add encrypted p2p transport {de}serializer by dhruv
  17. sidhujag referenced this in commit e7195b437a on Feb 12, 2022
  18. bitcoin 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: 2026-05-20 06:53 UTC