File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -1044,12 +1044,12 @@ bool AppInitParameterInteraction(const ArgsManager& args)
1044
1044
if (args.GetBoolArg (" -peerbloomfilters" , DEFAULT_PEERBLOOMFILTERS))
1045
1045
g_local_services = ServiceFlags (g_local_services | NODE_BLOOM);
1046
1046
1047
- if (args.IsArgSet (" -test" )) {
1047
+ const std::vector<std::string> test_options = args.GetArgs (" -test" );
1048
+ if (!test_options.empty ()) {
1048
1049
if (chainparams.GetChainType () != ChainType::REGTEST) {
1049
1050
return InitError (Untranslated (" -test=<option> can only be used with regtest" ));
1050
1051
}
1051
- const std::vector<std::string> options = args.GetArgs (" -test" );
1052
- for (const std::string& option : options) {
1052
+ for (const std::string& option : test_options) {
1053
1053
auto it = std::find_if (TEST_OPTIONS_DOC.begin (), TEST_OPTIONS_DOC.end (), [&option](const std::string& doc_option) {
1054
1054
size_t pos = doc_option.find (" (" );
1055
1055
return (pos != std::string::npos) && (doc_option.substr (0 , pos) == option);
You can’t perform that action at this time.
0 commit comments