refactor: Remove unused CDataStream::rdbuf method #26258

pull maflcko wants to merge 1 commits into bitcoin:master from maflcko:2210-no-rdbuf-🍥 changing 1 files +0 −1
  1. maflcko commented at 1:31 PM on October 5, 2022: member

    It is unused and seems unlikely to be ever used.

  2. Remove unused CDataStream::rdbuf method
    It is unused and seems unlikely to be ever used.
    fabbbe32ee
  3. theStack approved
  4. theStack commented at 2:16 PM on October 5, 2022: contributor

    Code-review ACK fabbbe32ee09430d356fd1843f7d5c716b5f46cc

    Seems like this method was introduced by Satoshi and hasn't been used for >10 years (last use was removed with commit 5ce4c2a23a756e20b85d721e08711e6faa3654ff) has never been used 👀

  5. aureleoules approved
  6. aureleoules commented at 2:20 PM on October 5, 2022: member

    ACK fabbbe32ee09430d356fd1843f7d5c716b5f46cc

  7. stickies-v commented at 2:24 PM on October 5, 2022: contributor

    Compact() also seems unused, can remove that too?

  8. maflcko commented at 2:50 PM on October 5, 2022: member

    Seems like this method was introduced by Satoshi and hasn't been used for >10 years (last use was removed with commit https://github.com/bitcoin/bitcoin/commit/5ce4c2a23a756e20b85d721e08711e6faa3654ff) eyes

    Was this ever used? Looks like the commit you link to was a call to ip::tcp::iostream::rdbuf(), which may not be CDataStream, but rather https://www.boost.org/doc/libs/1_80_0/doc/html/boost_asio/reference/basic_socket_iostream/rdbuf.html

  9. maflcko commented at 2:52 PM on October 5, 2022: member

    Compact() also seems unused, can remove that too?

    As opposed to rdbuf one could imagine a use case for this, so I kept it for now. But happy to drop as well if reviewers want that.

  10. theStack commented at 3:16 PM on October 5, 2022: contributor

    Seems like this method was introduced by Satoshi and hasn't been used for >10 years (last use was removed with commit 5ce4c2a) eyes

    Was this ever used? Looks like the commit you link to was a call to ip::tcp::iostream::rdbuf(), which may not be CDataStream, but rather https://www.boost.org/doc/libs/1_80_0/doc/html/boost_asio/reference/basic_socket_iostream/rdbuf.html

    Oh you're right, it seems the method you removed was indeed never used then 🤔

  11. DrahtBot added the label Refactoring on Oct 5, 2022
  12. fanquake merged this on Oct 10, 2022
  13. fanquake closed this on Oct 10, 2022

  14. sidhujag referenced this in commit 113be1dd58 on Oct 10, 2022
  15. maflcko deleted the branch on Oct 11, 2022
  16. bitcoin locked this on Oct 11, 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-04-22 06:13 UTC

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