@@ -828,19 +828,6 @@ void InitParameterInteraction()
828
828
if (gArgs .SoftSetBoolArg (" -whitelistrelay" , true ))
829
829
LogPrintf (" %s: parameter interaction: -whitelistforcerelay=1 -> setting -whitelistrelay=1\n " , __func__);
830
830
}
831
-
832
- // Warn if network-specific options (-addnode, -connect, etc) are
833
- // specified in default section of config file, but not overridden
834
- // on the command line or in this network's section of the config file.
835
- std::string network = gArgs .GetChainName ();
836
- for (const auto & arg : gArgs .GetUnsuitableSectionOnlyArgs ()) {
837
- InitWarning (strprintf (_ (" Config setting for %s only applied on %s network when in [%s] section." ), arg, network, network));
838
- }
839
-
840
- // Warn if unrecognized section name are present in the config file.
841
- for (const auto & section : gArgs .GetUnrecognizedSections ()) {
842
- InitWarning (strprintf (" %s:%i " + _ (" Section [%s] is not recognized." ), section.m_file , section.m_line , section.m_name ));
843
- }
844
831
}
845
832
846
833
static std::string ResolveErrMsg (const char * const optname, const std::string& strBind)
@@ -950,6 +937,19 @@ bool AppInitParameterInteraction()
950
937
951
938
// also see: InitParameterInteraction()
952
939
940
+ // Warn if network-specific options (-addnode, -connect, etc) are
941
+ // specified in default section of config file, but not overridden
942
+ // on the command line or in this network's section of the config file.
943
+ std::string network = gArgs .GetChainName ();
944
+ for (const auto & arg : gArgs .GetUnsuitableSectionOnlyArgs ()) {
945
+ return InitError (strprintf (_ (" Config setting for %s only applied on %s network when in [%s] section." ), arg, network, network));
946
+ }
947
+
948
+ // Warn if unrecognized section name are present in the config file.
949
+ for (const auto & section : gArgs .GetUnrecognizedSections ()) {
950
+ InitWarning (strprintf (" %s:%i " + _ (" Section [%s] is not recognized." ), section.m_file , section.m_line , section.m_name ));
951
+ }
952
+
953
953
if (!fs::is_directory (GetBlocksDir ())) {
954
954
return InitError (strprintf (_ (" Specified blocks directory \" %s\" does not exist." ), gArgs .GetArg (" -blocksdir" , " " ).c_str ()));
955
955
}
0 commit comments