mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-25 13:28:35 +01:00
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user