From 3d1e8ca53a05e7d4735a2207d1b200e1dcddc534 Mon Sep 17 00:00:00 2001 From: Ryan Ofsky Date: Thu, 19 Dec 2019 18:00:04 -0500 Subject: [PATCH] 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. --- src/init.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/init.cpp b/src/init.cpp index ad097284e04..cc25af43c16 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -762,7 +762,7 @@ void InitParameterInteraction(ArgsManager& args) } } - if (args.IsArgSet("-externalip")) { + if (!args.GetArgs("-externalip").empty()) { // if an explicit public IP is specified, do not try to find others if (args.SoftSetBoolArg("-discover", false)) LogInfo("parameter interaction: -externalip set -> setting -discover=0\n");