mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-25 13:28:35 +01:00
RPC: make RPCResult::MatchesType return useful errors
This commit is contained in:
@@ -324,8 +324,10 @@ struct RPCResult {
|
||||
std::string ToStringObj() const;
|
||||
/** Return the description string, including the result type. */
|
||||
std::string ToDescriptionString() const;
|
||||
/** Check whether the result JSON type matches. */
|
||||
bool MatchesType(const UniValue& result) const;
|
||||
/** Check whether the result JSON type matches.
|
||||
* Returns true if type matches, or object describing error(s) if not.
|
||||
*/
|
||||
UniValue MatchesType(const UniValue& result) const;
|
||||
|
||||
private:
|
||||
void CheckInnerDoc() const;
|
||||
|
||||
Reference in New Issue
Block a user