Prevent shared conf files from failing with different available options in different binaries #13441

pull achow101 wants to merge 1 commits into bitcoin:master from achow101:gargs-disabled-options changing 4 files +47 −20
  1. achow101 commented at 9:27 PM on June 11, 2018: member

    From IRC:

    <ossifrage> FYI, bitcoin-qt from the head I built today won't start if you have "daemon=0" in the config file, so you can't use the same config for either bitcoind or bitcoin-qt
    <ossifrage> Seems like bitcoin-qt should ignore this option?
    <provoostenator> ossifrage: probably caused by 13112. Another problem is disablewallet=1 will prevent a launch if you compile bitcoind without wallet. It probably needs to be relaxed slightly.
    

    Adds all of the options that are unavailable due to compiling options to the hidden category so that shared config files do not break with the alternative binaries.

  2. ken2812221 commented at 9:49 PM on June 11, 2018: contributor

    utACK 009f737. Maybe also take qt options into consideration.

  3. achow101 force-pushed on Jun 11, 2018
  4. achow101 commented at 9:57 PM on June 11, 2018: member

    Maybe also take qt options into consideration.

    Oh right. Added those.

  5. kallewoof commented at 12:18 AM on June 12, 2018: member

    utACK f6b81b23102377e9c4e81c65d1faf54306bd0c73

    All these lines makes me want to have a gArgs.AddDisabledArgs("-addresstype", "-changetype", ...) method though (could take a vector or vargs).

  6. achow101 force-pushed on Jun 12, 2018
  7. achow101 commented at 7:42 PM on June 12, 2018: member

    All these lines makes me want to have a gArgs.AddDisabledArgs("-addresstype", "-changetype", ...) method though (could take a vector or vargs).

    I have added such a method which takes a vector of strings to add as hidden arguments.

  8. in src/init.cpp:459 in abd07b99ba outdated
     453 | @@ -433,6 +454,11 @@ void SetupServerArgs()
     454 |      gArgs.AddArg("-zmqpubhashtx=<address>", "Enable publish hash transaction in <address>", false, OptionsCategory::ZMQ);
     455 |      gArgs.AddArg("-zmqpubrawblock=<address>", "Enable publish raw block in <address>", false, OptionsCategory::ZMQ);
     456 |      gArgs.AddArg("-zmqpubrawtx=<address>", "Enable publish raw transaction in <address>", false, OptionsCategory::ZMQ);
     457 | +#else
     458 | +    hidden_args.emplace_back("-zmqpubhashblock=<address>");
     459 | +    hidden_args.emplace_backg("-zmqpubhashtx=<address>");
    


    ken2812221 commented at 8:26 PM on June 12, 2018:

    typo here


    achow101 commented at 9:33 PM on June 12, 2018:

    Fixed

  9. Add unavailable options to hidden options category
    Options that are not available (but known in the source code) will
    cause an error if they are specified.
    Make these options "available" by adding them to the hidden options
    category to prevent conf files from failing when shared between binaries
    that have different options available.
    c2dfbb4a97
  10. achow101 force-pushed on Jun 12, 2018
  11. kallewoof approved
  12. kallewoof commented at 11:07 PM on June 12, 2018: member

    utACK c2dfbb4a97513557fe923b7810ea8639c320fefd

  13. ken2812221 approved
  14. ken2812221 commented at 10:11 AM on June 13, 2018: contributor

    utACK c2dfbb4

  15. MarcoFalke commented at 5:48 PM on June 13, 2018: member

    utACK c2dfbb4a97513557fe923b7810ea8639c320fefd

  16. MarcoFalke merged this on Jun 13, 2018
  17. MarcoFalke closed this on Jun 13, 2018

  18. MarcoFalke referenced this in commit 4a7e64fc85 on Jun 13, 2018
  19. UdjinM6 referenced this in commit d0a21c7166 on Jun 19, 2021
  20. UdjinM6 referenced this in commit 4013512216 on Jun 24, 2021
  21. UdjinM6 referenced this in commit 01b5315a93 on Jun 26, 2021
  22. UdjinM6 referenced this in commit faddce8271 on Jun 26, 2021
  23. UdjinM6 referenced this in commit ff9623ec1c on Jun 28, 2021
  24. MarcoFalke locked this on Sep 8, 2021

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

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