init: reject -noconnect double-negatives that become -connect=1 #35939

pull Avecci-Claussen wants to merge 2 commits into bitcoin:master from Avecci-Claussen:master changing 2 files +19 −0
  1. Avecci-Claussen commented at 7:15 PM on August 9, 2026: none

    Fixes #31426.

    Motivation

    -noconnect=0 is interpreted as -connect=1, which is interpreted as -connect=0.0.0.1

    bitcoind -noconnect=0 -debug=net
    

    before this change that leads to a connection attempt to 0.0.0.1 (and the usual -connect parameter interactions that disable listen/dnsseed). bitcoind should not try to connect to 0.0.0.1 from that permutation.

    Change

    Fail init for invalid -noconnect values, same pattern as -wallet / -nowallet: -connect must be a string host/IP -noconnect / -noconnect=1 still disable automatic connections

    Double-negatives like -noconnect=0 are stored as boolean true, which GetArgs stringifies as "1" and Lookup resolves as 0.0.0.1

    those now error instead.

  2. Update init.cpp 2df1750c32
  3. Update feature_config_args.py 32cf26d559
  4. DrahtBot commented at 7:15 PM on August 9, 2026: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

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

    <!--006a51241073e994b41acfe9ec718e94-->

    Code Coverage & Benchmarks

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

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

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

    <!--5faf32d7da4f0f540f40219e4f7537a3-->


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-08-11 12:51 UTC

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