Changeset View
Changeset View
Standalone View
Standalone View
src/test/test_bitcoin_main.cpp
Show All 24 Lines | |||||
} | } | ||||
bool ShutdownRequested() { | bool ShutdownRequested() { | ||||
return false; | return false; | ||||
} | } | ||||
std::set<std::string> testArgs = { | std::set<std::string> testArgs = { | ||||
"-activatenextupgrade", | "-activatenextupgrade", | ||||
"-gravitonactivationtime", | |||||
"-phononactivationtime", | "-phononactivationtime", | ||||
}; | }; | ||||
deadalnix: lol, why is that a global? I won't request change for this because this is clearly out of scope… | |||||
int main(int argc, char *argv[]) { | int main(int argc, char *argv[]) { | ||||
// Additional CLI params supported by test_bitcoin: | // Additional CLI params supported by test_bitcoin: | ||||
// Note: gArgs.ParseParameters() cannot be called here or it will fail to | // Note: gArgs.ParseParameters() cannot be called here or it will fail to | ||||
// parse BOOST runtime params. | // parse BOOST runtime params. | ||||
for (int i = 1; i < argc; i++) { | for (int i = 1; i < argc; i++) { | ||||
std::string key(argv[i]); | std::string key(argv[i]); | ||||
std::string value; | std::string value; | ||||
if (ParseKeyValue(key, value)) { | if (ParseKeyValue(key, value)) { | ||||
if (testArgs.count(key) > 0) { | if (testArgs.count(key) > 0) { | ||||
gArgs.ForceSetArg(key, value); | gArgs.ForceSetArg(key, value); | ||||
} | } | ||||
} | } | ||||
} | } | ||||
return boost::unit_test::unit_test_main(&init_unit_test, argc, argv); | return boost::unit_test::unit_test_main(&init_unit_test, argc, argv); | ||||
} | } |
lol, why is that a global? I won't request change for this because this is clearly out of scope, but seriously, WTF !?!!??!?