mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-15 12:51:00 +02: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:
parent
c2d04f1319
commit
802e6e128b
3 changed files with 33 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue