mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-10 11:57:28 -03:00
rpc: Treat all args after a hidden arg as hidden as well
This commit has no effect right now, but hardens the code for the future
This commit is contained in:
parent
a78742830a
commit
fa459bdc87
1 changed files with 2 additions and 2 deletions
|
@ -504,7 +504,7 @@ std::string RPCHelpMan::ToString() const
|
|||
ret += m_name;
|
||||
bool was_optional{false};
|
||||
for (const auto& arg : m_args) {
|
||||
if (arg.m_hidden) continue;
|
||||
if (arg.m_hidden) break; // Any arg that follows is also hidden
|
||||
const bool optional = arg.IsOptional();
|
||||
ret += " ";
|
||||
if (optional) {
|
||||
|
@ -526,7 +526,7 @@ std::string RPCHelpMan::ToString() const
|
|||
Sections sections;
|
||||
for (size_t i{0}; i < m_args.size(); ++i) {
|
||||
const auto& arg = m_args.at(i);
|
||||
if (arg.m_hidden) continue;
|
||||
if (arg.m_hidden) break; // Any arg that follows is also hidden
|
||||
|
||||
if (i == 0) ret += "\nArguments:\n";
|
||||
|
||||
|
|
Loading…
Reference in a new issue