You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/rpc/util.h
+10-7Lines changed: 10 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -154,21 +154,24 @@ struct RPCArg {
154
154
/** Required arg */
155
155
NO,
156
156
/**
157
+
* The arg is optional for one of two reasons:
158
+
*
157
159
* Optional arg that is a named argument and has a default value of
158
-
* `null`. When possible, the default value should be specified.
159
-
*/
160
-
OMITTED_NAMED_ARG,
161
-
/**
160
+
* `null`.
161
+
*
162
162
* Optional argument with default value omitted because they are
163
-
* implicitly clear. That is, elements in an array or object may not
163
+
* implicitly clear. That is, elements in an array may not
164
164
* exist by default.
165
165
* When possible, the default value should be specified.
166
166
*/
167
167
OMITTED,
168
+
OMITTED_NAMED_ARG, // Deprecated alias for OMITTED, can be removed
168
169
};
170
+
/** Hint for default value */
169
171
using DefaultHint = std::string;
172
+
/** Default constant value */
170
173
using Default = UniValue;
171
-
using Fallback = std::variant<Optional, /* hint for default value */DefaultHint,/* default constant value */ Default>;
174
+
using Fallback = std::variant<Optional, DefaultHint, Default>;
172
175
173
176
const std::string m_names; //!< The name of the arg (can be empty for inner args, can contain multiple aliases separated by | for named request arguments)
174
177
const Type m_type;
@@ -234,7 +237,7 @@ struct RPCArg {
234
237
* Return the description string, including the argument type and whether
0 commit comments