mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-25 10:43:19 -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;
|
ret += m_name;
|
||||||
bool was_optional{false};
|
bool was_optional{false};
|
||||||
for (const auto& arg : m_args) {
|
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();
|
const bool optional = arg.IsOptional();
|
||||||
ret += " ";
|
ret += " ";
|
||||||
if (optional) {
|
if (optional) {
|
||||||
|
@ -526,7 +526,7 @@ std::string RPCHelpMan::ToString() const
|
||||||
Sections sections;
|
Sections sections;
|
||||||
for (size_t i{0}; i < m_args.size(); ++i) {
|
for (size_t i{0}; i < m_args.size(); ++i) {
|
||||||
const auto& arg = m_args.at(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";
|
if (i == 0) ret += "\nArguments:\n";
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue