validation: remove unused using directives #25433

pull Crypt-iQ wants to merge 1 commits into bitcoin:master from Crypt-iQ:remove_using changing 1 files +0 −4
  1. Crypt-iQ commented at 11:58 pm on June 20, 2022: contributor

    I noticed the following were unused from the node namespace in validation.cpp:

    • BLOCKFILE_CHUNK_SIZE
    • nPruneTarget
    • OpenBlockFile
    • UNDOFILE_CHUNK_SIZE

    I am not sure if maybe there is some reason these are still defined here in which case I’ll close this

  2. validation: remove unused using directives
    The following were unused from the node namespace:
    - BLOCKFILE_CHUNK_SIZE
    - nPruneTarget
    - OpenBlockFile
    - UNDOFILE_CHUNK_SIZE
    73271802ae
  3. DrahtBot added the label Validation on Jun 21, 2022
  4. DrahtBot commented at 4:48 am on June 21, 2022: member

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

    Conflicts

    No conflicts as of last run.

  5. laanwj added the label Refactoring on Jun 21, 2022
  6. laanwj removed the label Validation on Jun 21, 2022
  7. Crypt-iQ commented at 10:29 pm on June 22, 2022: contributor
    I noticed there is another one in src/rpc/transaction.cpp for ReadBlockFromDisk
  8. MarcoFalke commented at 5:27 am on June 23, 2022: member
    not sure if this is worth it. If it is, maybe a iwyu/linter/tidy check would be better?
  9. Crypt-iQ commented at 12:08 pm on June 24, 2022: contributor
    I think an automated check would be better than this, but I wouldn’t want to add something that rarely catches anything (I think an unused using directive would be kind of rare?). Maybe it’s better to let somebody remove these as part of a larger validation PR
  10. MarcoFalke commented at 12:39 pm on June 24, 2022: member

    We already run clang-tidy, so there is no additional cost of enabling https://clang.llvm.org/extra/clang-tidy/checks/misc/unused-using-decls.html

    The question is: Is it worth it?

    If the clang-tidy check helps to avoid:

    • pr flood to “fix” this issue
    • review comments to suggest to “fix” this issue
    • wasted review on re-ACKs if the style comment is addressed

    I’d say it is worth it.

    (Surely it is frustrating to open a pull request and see a red CI 6 minutes later, but if a pull request author isn’t willing to put up 6 minutes of their time, maybe they shouldn’t open a pull request in the first place to ask others to spend time on it.)

  11. Crypt-iQ closed this on Jun 24, 2022

  12. MarcoFalke referenced this in commit 47c86a023d on Jul 19, 2022
  13. PastaPastaPasta referenced this in commit b6c18ae577 on Oct 18, 2022
  14. DrahtBot locked this on Jun 24, 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-10-04 19:12 UTC

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