diff options
author | MarcoFalke <falke.marco@gmail.com> | 2022-01-25 19:48:26 +0100 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2022-01-25 20:05:44 +0100 |
commit | fac8caaa6252c6e18301a263d325d63197062639 (patch) | |
tree | 7b4e5d71b0129733cb82148afcbd0452355e165b /src/rpc/util.h | |
parent | 39d9bbe4acd7441aa9a61c57b76d887c4225a0e2 (diff) | |
download | bitcoin-fac8caaa6252c6e18301a263d325d63197062639.tar.xz |
doc: Fix rpc docs
Broken in commit 39d9bbe4acd7441aa9a61c57b76d887c4225a0e2
Diffstat (limited to 'src/rpc/util.h')
-rw-r--r-- | src/rpc/util.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/rpc/util.h b/src/rpc/util.h index 352a3e4e4e..25ebf78fa1 100644 --- a/src/rpc/util.h +++ b/src/rpc/util.h @@ -240,7 +240,6 @@ struct RPCResult { STR_AMOUNT, //!< Special string to represent a floating point amount STR_HEX, //!< Special string with only hex chars OBJ_DYN, //!< Special dictionary with keys that are not literals - OBJ_EMPTY, //!< Special type to allow empty OBJ ARR_FIXED, //!< Special array that has a fixed number of entries NUM_TIME, //!< Special numeric to denote unix epoch time ELISION, //!< Special type to denote elision (...) @@ -268,8 +267,7 @@ struct RPCResult { m_cond{std::move(cond)} { CHECK_NONFATAL(!m_cond.empty()); - const bool inner_needed{type == Type::ARR || type == Type::ARR_FIXED || type == Type::OBJ || type == Type::OBJ_DYN}; - CHECK_NONFATAL(inner_needed != inner.empty()); + CheckInnerDoc(); } RPCResult( @@ -293,8 +291,7 @@ struct RPCResult { m_description{std::move(description)}, m_cond{} { - const bool inner_needed{type == Type::ARR || type == Type::ARR_FIXED || type == Type::OBJ || type == Type::OBJ_DYN}; - CHECK_NONFATAL(inner_needed != inner.empty()); + CheckInnerDoc(); } RPCResult( @@ -312,6 +309,9 @@ struct RPCResult { std::string ToDescriptionString() const; /** Check whether the result JSON type matches. */ bool MatchesType(const UniValue& result) const; + +private: + void CheckInnerDoc() const; }; struct RPCResults { |