aboutsummaryrefslogtreecommitdiff
path: root/src/rpc/util.cpp
diff options
context:
space:
mode:
authorPieter Wuille <pieter.wuille@gmail.com>2019-02-27 13:45:47 -0800
committerPieter Wuille <pieter.wuille@gmail.com>2019-02-28 13:00:13 -0800
commit6b9f45e81bfe7472493b6df66133c929780ef2fb (patch)
tree65fbf15c855f34860d2f7e653210b0a0da4c4074 /src/rpc/util.cpp
parent7aa6a8aefbb2013ef3dc87ecbdf5d947d4b413af (diff)
Support ranges arguments in RPC help
Diffstat (limited to 'src/rpc/util.cpp')
-rw-r--r--src/rpc/util.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/rpc/util.cpp b/src/rpc/util.cpp
index 7fb139f93c..40ac133186 100644
--- a/src/rpc/util.cpp
+++ b/src/rpc/util.cpp
@@ -200,6 +200,7 @@ struct Sections {
case RPCArg::Type::STR:
case RPCArg::Type::NUM:
case RPCArg::Type::AMOUNT:
+ case RPCArg::Type::RANGE:
case RPCArg::Type::BOOL: {
if (outer_type == OuterType::NAMED_ARG) return; // Nothing more to do for non-recursive types on first recursion
auto left = indent;
@@ -405,6 +406,10 @@ std::string RPCArg::ToDescriptionString() const
ret += "numeric or string";
break;
}
+ case Type::RANGE: {
+ ret += "numeric or array";
+ break;
+ }
case Type::BOOL: {
ret += "boolean";
break;
@@ -464,6 +469,8 @@ std::string RPCArg::ToStringObj(const bool oneline) const
return res + "\"hex\"";
case Type::NUM:
return res + "n";
+ case Type::RANGE:
+ return res + "n or [n,n]";
case Type::AMOUNT:
return res + "amount";
case Type::BOOL:
@@ -494,6 +501,7 @@ std::string RPCArg::ToString(const bool oneline) const
return "\"" + m_name + "\"";
}
case Type::NUM:
+ case Type::RANGE:
case Type::AMOUNT:
case Type::BOOL: {
return m_name;