mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-20 12:39:47 +01:00
[init] Add new command line arg for use only in functional tests
some of the existing command line args are to be only used in functional tests. ex: addrmantest, fastprune etc.. make a separate category -test=<option> for these so that code is cleaner and user's debug-help output is straightforward.
This commit is contained in:
@@ -682,6 +682,17 @@ std::string HelpMessageOpt(const std::string &option, const std::string &message
|
||||
std::string("\n\n");
|
||||
}
|
||||
|
||||
const std::vector<std::string> TEST_OPTIONS_DOC{
|
||||
};
|
||||
|
||||
bool HasTestOption(const ArgsManager& args, const std::string& test_option)
|
||||
{
|
||||
const auto options = args.GetArgs("-test");
|
||||
return std::any_of(options.begin(), options.end(), [test_option](const auto& option) {
|
||||
return option == test_option;
|
||||
});
|
||||
}
|
||||
|
||||
fs::path GetDefaultDataDir()
|
||||
{
|
||||
// Windows: C:\Users\Username\AppData\Roaming\Bitcoin
|
||||
|
||||
Reference in New Issue
Block a user