Motivation
-noconnect=0
is interpreted as -connect=1
which is interpreted as -connect=0.0.0.1
0₿ build/src/bitcoind -noconnect=0 -debug=net
Produces the following output:
02024-12-05T08:20:41Z Warning: parsed potentially confusing double-negative -connect=0
12024-12-05T08:20:41Z Bitcoin Core version v28.99.0-95a0104f2e98-dirty (release build)
22024-12-05T08:20:41Z parameter interaction: -connect or -maxconnections=0 set -> setting -dnsseed=0
32024-12-05T08:20:41Z parameter interaction: -connect or -maxconnections=0 set -> setting -listen=0
42024-12-05T08:20:41Z parameter interaction: -listen=0 -> setting -natpmp=0
52024-12-05T08:20:41Z parameter interaction: -listen=0 -> setting -discover=0
62024-12-05T08:20:41Z parameter interaction: -listen=0 -> setting -listenonion=0
72024-12-05T08:20:41Z parameter interaction: -listen=0 -> setting -i2pacceptincoming=0
8...
92024-12-05T08:20:44Z net thread start
102024-12-05T08:20:49Z [net] connection attempt to 0.0.0.1:8333 timed out
112024-12-05T08:20:50Z [net] trying v2 connection 1 lastseen=0.0hrs
Main issue
bitcoind
should not try to connect to the 0.0.0.1
IPv4 address.
Bonus
-noconnect=0
should not result in -dnsseed=0
and -listen=0
in the parameter interaction logic.
Issue inspiration: #31212 (comment)
Possible solution
Probably best to fail the Init-stage for invalid -(no)connect(=value)
permutations.
Should include a functional test verifying that there is an Init-error for this case, possibly added to test/functional/feature_config_args.py.