refactor: Remove unused GetType() from CBufferedFile and CAutoFile #28458

pull maflcko wants to merge 3 commits into bitcoin:master from maflcko:2309-no-file-type- changing 10 files +31 −38
  1. maflcko commented at 11:00 am on September 12, 2023: member

    This refactor is required for #28052 and #28451

    Thus, split it out.

  2. dbwrapper: Use DataStream for batch operations 5c2b3cd4b8
  3. Remove unused GetType() from CBufferedFile and CAutoFile
    GetType() is only called in tests, so it is unused and can be removed.
    fa2f2413b8
  4. scripted-diff: Rename CBufferedFile to BufferedFile
    While touching all constructors in the previous commit, the class name
    can be adjusted to comply with the style guide.
    
    -BEGIN VERIFY SCRIPT-
     sed -i 's/CBufferedFile/BufferedFile/g' $( git grep -l CBufferedFile )
    -END VERIFY SCRIPT-
    fa19c914f7
  5. DrahtBot commented at 11:00 am on September 12, 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.

    Type Reviewers
    ACK TheCharlatan, ajtowns

    If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #28451 (Remove unused SER_DISK, SER_NETWORK, SER_GETHASH by MarcoFalke)
    • #28207 (mempool: Persist with XOR by MarcoFalke)
    • #28052 (blockstorage: XOR blocksdir *.dat files by MarcoFalke)
    • #24230 (indexes: Stop using node internal types and locking cs_main, improve sync logic by ryanofsky)

    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.

  6. maflcko renamed this:
    Remove unused GetType() from CBufferedFile and CAutoFile
    refactor: Remove unused GetType() from CBufferedFile and CAutoFile
    on Sep 12, 2023
  7. DrahtBot added the label Refactoring on Sep 12, 2023
  8. in src/streams.h:580 in fa19c914f7
    576@@ -577,7 +577,7 @@ class CAutoFile : public AutoFile
    577  *  Will automatically close the file when it goes out of scope if not null.
    578  *  If you need to close the file early, use file.fclose() instead of fclose(file).
    579  */
    580-class CBufferedFile
    


    TheCharlatan commented at 9:35 am on September 13, 2023:
    Why not do the rename for CAutoFile too?

    maflcko commented at 10:04 am on September 13, 2023:

    CAutoFile can not be renamed to AutoFile, because CAutoFile is a derived class of AutoFile.

    Also, renaming CAutoFile does not make sense, because it will be removed in the future.

  9. TheCharlatan approved
  10. TheCharlatan commented at 12:56 pm on September 13, 2023: contributor
    ACK fa19c914f7fe7be127c0fb330b41ff7c091f40aa
  11. ajtowns commented at 2:42 am on September 14, 2023: contributor
    utACK fa19c914f7fe7be127c0fb330b41ff7c091f40aa
  12. maflcko added this to the milestone 26.0 on Sep 14, 2023
  13. fanquake merged this on Sep 14, 2023
  14. fanquake closed this on Sep 14, 2023

  15. maflcko deleted the branch on Sep 14, 2023
  16. Frank-GER referenced this in commit 74b9a4072f on Sep 19, 2023
  17. bitcoin locked this on Sep 13, 2024

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-12-04 06:12 UTC

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