Skip to content

Commit 3d1e8ca

Browse files
committed
Normalize inconsistent -noexternalip behavior
Treat specifying -noexternalip the same as not specifying -externalip, instead of causing it to soft-set the -discover default to false. Before this change, was -noexternalip basically an undocumented synonym for -nodiscover. After this change, specifying -noexternalip just clears previously specifed -externalip options, restoring default behavior as if they were not were specified. The previous -noexternalip behavior wasn't neccessarily bad, but it was undocumented, redundant with the -nodiscover option, and inconsistent with behavior of other list options.
1 parent ecd590d commit 3d1e8ca

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/init.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -762,7 +762,7 @@ void InitParameterInteraction(ArgsManager& args)
762762
}
763763
}
764764

765-
if (args.IsArgSet("-externalip")) {
765+
if (!args.GetArgs("-externalip").empty()) {
766766
// if an explicit public IP is specified, do not try to find others
767767
if (args.SoftSetBoolArg("-discover", false))
768768
LogInfo("parameter interaction: -externalip set -> setting -discover=0\n");

0 commit comments

Comments
 (0)