| 67 | } |
| 68 | |
| 69 | void RPCTypeCheckArgument(const UniValue& value, const UniValueType& typeExpected) |
| 70 | { |
| 71 | if (!typeExpected.typeAny && value.type() != typeExpected.type) { |
| 72 | throw JSONRPCError(RPC_TYPE_ERROR, strprintf("Expected type %s, got %s", uvTypeName(typeExpected.type), uvTypeName(value.type()))); |
| 73 | } |
| 74 | } |
| 75 | |
| 76 | void RPCTypeCheckObj(const UniValue& o, |
| 77 | const std::map<std::string, UniValueType>& typesExpected, |
no test coverage detected