mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-17 13:07:54 +02:00
Merge a196c89317 into merged_master (Bitcoin PR bitcoin/bitcoin#22270)
Some PRs ago (in #19937) the bitcoin-util binary was added, which we didn't notice and didn't rename to elements-util. This commit adds some tests for it, which made me notice it ... so rename it here.
This commit is contained in:
commit
bb8e5d1ce4
8 changed files with 104 additions and 42 deletions
|
|
@ -608,14 +608,14 @@ void ArgsManager::ForceSetArg(const std::string& strArg, const std::string& strV
|
|||
m_settings.forced_settings[SettingName(strArg)] = strValue;
|
||||
}
|
||||
|
||||
void ArgsManager::AddCommand(const std::string& cmd, const std::string& help, const OptionsCategory& cat)
|
||||
void ArgsManager::AddCommand(const std::string& cmd, const std::string& help)
|
||||
{
|
||||
Assert(cmd.find('=') == std::string::npos);
|
||||
Assert(cmd.at(0) != '-');
|
||||
|
||||
LOCK(cs_args);
|
||||
m_accept_any_command = false; // latch to false
|
||||
std::map<std::string, Arg>& arg_map = m_available_args[cat];
|
||||
std::map<std::string, Arg>& arg_map = m_available_args[OptionsCategory::COMMANDS];
|
||||
auto ret = arg_map.emplace(cmd, Arg{"", help, ArgsManager::COMMAND});
|
||||
Assert(ret.second); // Fail on duplicate commands
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue