MCPcopy Create free account
hub / github.com/ElementsProject/elements / IsValidNumArgs

Method IsValidNumArgs

src/rpc/util.cpp:604–614  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

602}
603
604bool RPCHelpMan::IsValidNumArgs(size_t num_args) const
605{
606 size_t num_required_args = 0;
607 for (size_t n = m_args.size(); n > 0; --n) {
608 if (!m_args.at(n - 1).IsOptional()) {
609 num_required_args = n;
610 break;
611 }
612 }
613 return num_required_args <= num_args && num_args <= m_args.size();
614}
615
616std::vector<std::string> RPCHelpMan::GetArgNames() const
617{

Callers

nothing calls this directly

Calls 2

IsOptionalMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected