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
"If verbosity is 2, returns an Object with information about block <hash> and information about each transaction. \n",
813
813
{
814
814
{"blockhash", RPCArg::Type::STR_HEX, RPCArg::Optional::NO, "The block hash"},
815
-
{"verbosity", RPCArg::Type::NUM, /* default */"1", "0 for hex-encoded data, 1 for a json object, and 2 for json object with transaction data"},
815
+
{"verbosity|verbose", RPCArg::Type::NUM, /* default */"1", "0 for hex-encoded data, 1 for a json object, and 2 for json object with transaction data"},
Copy file name to clipboardExpand all lines: src/rpc/util.h
+9-3Lines changed: 9 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -142,7 +142,7 @@ struct RPCArg {
142
142
OMITTED,
143
143
};
144
144
using Fallback = boost::variant<Optional, /* default value for optional args */ std::string>;
145
-
const std::string m_name; //!< The name of the arg (can be empty for inner args)
145
+
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)
146
146
const Type m_type;
147
147
const std::vector<RPCArg> m_inner; //!< Only used for arrays or dicts
148
148
const Fallback m_fallback;
@@ -157,7 +157,7 @@ struct RPCArg {
157
157
const std::string description,
158
158
const std::string oneline_description = "",
159
159
const std::vector<std::string> type_str = {})
160
-
: m_name{std::move(name)},
160
+
: m_names{std::move(name)},
161
161
m_type{std::move(type)},
162
162
m_fallback{std::move(fallback)},
163
163
m_description{std::move(description)},
@@ -175,7 +175,7 @@ struct RPCArg {
175
175
const std::vector<RPCArg> inner,
176
176
const std::string oneline_description = "",
177
177
const std::vector<std::string> type_str = {})
178
-
: m_name{std::move(name)},
178
+
: m_names{std::move(name)},
179
179
m_type{std::move(type)},
180
180
m_inner{std::move(inner)},
181
181
m_fallback{std::move(fallback)},
@@ -188,6 +188,12 @@ struct RPCArg {
188
188
189
189
boolIsOptional() const;
190
190
191
+
/** Return the first of all aliases */
192
+
std::string GetFirstName() const;
193
+
194
+
/** Return the name, throws when there are aliases */
195
+
std::string GetName() const;
196
+
191
197
/**
192
198
* Return the type string of the argument.
193
199
* Set oneline to allow it to be overridden by a custom oneline type string (m_oneline_description).
0 commit comments