refactor: inline constant f_obfuscate = false parameter #34048

pull l0rinc wants to merge 1 commits into bitcoin:master from l0rinc:l0rinc/inline-constant-obfuscate-param changing 2 files +3 −4
  1. l0rinc commented at 10:26 pm on December 10, 2025: contributor

    Split out of #33324 since it makes sense on its own.

    Currently the parameter is only called with a single constant parameter, it doesn’t make sense to needlessly obfuscate the constructor (pun intended).

  2. refactor: inline constant `f_obfuscate = false` parameter 1670fb14d0
  3. DrahtBot added the label Refactoring on Dec 10, 2025
  4. DrahtBot commented at 10:26 pm on December 10, 2025: contributor

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

    Code Coverage & Benchmarks

    For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/34048.

    Reviews

    See the guideline for information on the review process. A summary of reviews will appear here.

  5. in src/index/base.h:68 in 1670fb14d0
    63@@ -64,8 +64,7 @@ class BaseIndex : public CValidationInterface
    64     class DB : public CDBWrapper
    65     {
    66     public:
    67-        DB(const fs::path& path, size_t n_cache_size,
    68-           bool f_memory = false, bool f_wipe = false, bool f_obfuscate = false);
    


    maflcko commented at 8:10 am on December 11, 2025:

    i presume this exists to allow indexes to obfuscate, if there is need to? E.g. when storing remote-user-provided data. E.g. an addrindex?

    I understand this isn’t needed right now, so no strong opinion.


    l0rinc commented at 12:49 pm on December 11, 2025:
    Yes, it’s an unused argument - it’s clearer to remove the fake single-instance-abstraction
  6. Ataraxia009 commented at 9:09 am on December 11, 2025: none
    Concept NAck, could be needed in the future, no point in hiding it
  7. l0rinc commented at 10:31 am on December 11, 2025: contributor
    if it’s needed in the future, it’s trivial to reintroduce it.
  8. Ataraxia009 commented at 5:52 am on December 12, 2025: none

    if it’s needed in the future, it’s trivial to reintroduce it.

    It seems like a strong enough option to leave as is still but ill defer to others i dont have a strong opinion


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: 2025-12-13 18:12 UTC

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