MCPcopy Create free account
hub / github.com/bitcoin/bitcoin / GetCommand

Method GetCommand

src/common/args.cpp:370–388  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

368}
369
370std::optional<const ArgsManager::Command> ArgsManager::GetCommand() const
371{
372 Command ret;
373 LOCK(cs_args);
374 auto it = m_command.begin();
375 if (it == m_command.end()) {
376 // No command was passed
377 return std::nullopt;
378 }
379 if (!m_accept_any_command) {
380 // The registered command
381 ret.command = *(it++);
382 }
383 while (it != m_command.end()) {
384 // The unregistered command and args (if any)
385 ret.args.push_back(*(it++));
386 }
387 return ret;
388}
389
390bool ArgsManager::CheckCommandOptions(const std::string& command, std::vector<std::string>* errors) const
391{

Callers 4

bitcoin-util.cppFile · 0.80
bitcoin-wallet.cppFile · 0.80
BOOST_AUTO_TEST_CASEFunction · 0.80
system.cppFile · 0.80

Calls 3

beginMethod · 0.45
endMethod · 0.45
push_backMethod · 0.45

Tested by 1

BOOST_AUTO_TEST_CASEFunction · 0.64