mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-18 13:17:55 +02:00
Merge 80e16cadd5 into merged_master (Bitcoin PR #20012)
Made some edits to rpc/client.cpp on the advice of test/functional/rpc_help.py to make the "RPC conversion tables" consistent, but I have no idea what these tables are or what they're for. I assume, given that nobody has noticed these inconsistencies ever, that they're fine.
This commit is contained in:
commit
561bf64d1b
16 changed files with 321 additions and 387 deletions
|
|
@ -560,6 +560,24 @@ std::string RPCHelpMan::ToString() const
|
|||
return ret;
|
||||
}
|
||||
|
||||
void RPCHelpMan::AppendArgMap(UniValue& arr) const
|
||||
{
|
||||
for (int i{0}; i < int(m_args.size()); ++i) {
|
||||
const auto& arg = m_args.at(i);
|
||||
std::vector<std::string> arg_names;
|
||||
boost::split(arg_names, arg.m_names, boost::is_any_of("|"));
|
||||
for (const auto& arg_name : arg_names) {
|
||||
UniValue map{UniValue::VARR};
|
||||
map.push_back(m_name);
|
||||
map.push_back(i);
|
||||
map.push_back(arg_name);
|
||||
map.push_back(arg.m_type == RPCArg::Type::STR ||
|
||||
arg.m_type == RPCArg::Type::STR_HEX);
|
||||
arr.push_back(map);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
std::string RPCArg::GetFirstName() const
|
||||
{
|
||||
return m_names.substr(0, m_names.find("|"));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue