| 54 | } |
| 55 | |
| 56 | void RPCTypeCheckArgument(const UniValue& value, const UniValueType& typeExpected) |
| 57 | { |
| 58 | if (!typeExpected.typeAny && value.type() != typeExpected.type) { |
| 59 | throw JSONRPCError(RPC_TYPE_ERROR, strprintf("Expected type %s, got %s", uvTypeName(typeExpected.type), uvTypeName(value.type()))); |
| 60 | } |
| 61 | } |
| 62 | |
| 63 | void RPCTypeCheckObj(const UniValue& o, |
| 64 | const std::map<std::string, UniValueType>& typesExpected, |
no test coverage detected