Revert "net: do not advertise address where nobody is listening" #24648

pull hebasto wants to merge 1 commits into bitcoin:master from hebasto:220323-listen changing 1 files +0 −5
  1. hebasto commented at 8:10 AM on March 23, 2022: member

    This is a quick fix bitcoin-core/gui#567 which is assumed to be backported to 23.0rc3.

    Effectively, this PR reverts bitcoin/bitcoin#20769 which could be implemented later in a better way.

  2. Revert "net: do not advertise address where nobody is listening"
    This reverts commit a38137479bf5e25bf65a62e46b81fc43fb3df75c.
    db8bf612bc
  3. hebasto added the label Needs backport (23.x) on Mar 23, 2022
  4. hebasto added this to the milestone 23.0 on Mar 23, 2022
  5. hebasto cross-referenced this on Mar 23, 2022 from issue v23.0 testing by laanwj
  6. hebasto cross-referenced this on Mar 23, 2022 from issue Unable to open bitcoin-qt when incoming connections disabled in settings by ghost
  7. fanquake commented at 9:38 AM on March 23, 2022: member

    I'm very ~0 on last-minute reverting bug fixes to bitcoind, to fix problems in the GUI.

  8. vasild commented at 9:40 AM on March 23, 2022: contributor

    I am a bit ~-0.1 on this. However, the problem is quite serious - bitcoin-qt just will refuse to start. Lets see if there would be better solution...

  9. MarcoFalke commented at 9:43 AM on March 23, 2022: member

    I don't think there is anything wrong with reverting a hunk that was never released in a release

  10. hebasto commented at 9:44 AM on March 23, 2022: member

    I'm very ~0 on last-minute reverting bug fixes to bitcoind, to fix problems in the GUI.

    In comparison the "bug" that had been fixed in #20769 with the bitcoin-core/gui#567, the latter looks much more seriously.

    And, considering #20657 (comment):

    Should we automatically set listenonion to 0 if listen is set to 0?

    we already do in https://github.com/bitcoin/bitcoin/blob/d6f225f5c9f8382878e6970b707e57838e312f8c/src/init.cpp#L688-L689

  11. vasild commented at 10:02 AM on March 23, 2022: contributor

    What about this:

    --- i/src/qt/optionsmodel.cpp
    +++ w/src/qt/optionsmodel.cpp
    @@ -148,14 +148,17 @@ void OptionsModel::Init(bool resetSettings)
         if (!gArgs.SoftSetBoolArg("-natpmp", settings.value("fUseNatpmp").toBool())) {
             addOverriddenOption("-natpmp");
         }
     
         if (!settings.contains("fListen"))
             settings.setValue("fListen", DEFAULT_LISTEN);
    -    if (!gArgs.SoftSetBoolArg("-listen", settings.value("fListen").toBool()))
    +    if (!gArgs.SoftSetBoolArg("-listen", settings.value("fListen").toBool())) {
             addOverriddenOption("-listen");
    +    } else if (!settings.value("fListen").toBool()) {
    +        gArgs.SoftSetBoolArg("-listenonion", false);
    +    }
     
         if (!settings.contains("server")) {
             settings.setValue("server", false);
         }
         if (!gArgs.SoftSetBoolArg("-server", settings.value("server").toBool())) {
             addOverriddenOption("-server");
    

    It fixes https://github.com/bitcoin-core/gui/issues/567 without reintroducing #20657.

  12. hebasto commented at 10:07 AM on March 23, 2022: member

    @vasild

    What about this:

    Mind submitting a PR in https://github.com/bitcoin-core/gui/pulls?

  13. vasild commented at 10:37 AM on March 23, 2022: contributor
  14. hebasto cross-referenced this on Mar 23, 2022 from issue options: flip listenonion to false if not listening by vasild
  15. hebasto commented at 10:52 AM on March 23, 2022: member

    I'm very ~0 on last-minute reverting bug fixes to bitcoind, to fix problems in the GUI.

    I am a bit ~-0.1 on this. However, the problem is quite serious - bitcoin-qt just will refuse to start. Lets see if there would be better solution...

    Okay, closing in favor of bitcoin-core/gui#568.

  16. hebasto closed this on Mar 23, 2022

  17. hebasto deleted the branch on Mar 23, 2022
  18. hebasto removed the label Needs backport (23.x) on Mar 24, 2022
  19. bitcoin locked this on Mar 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: 2026-05-20 06:53 UTC