MCPcopy Create free account
hub / github.com/BTCGPU/BTCGPU / RPCTypeCheckArgument

Function RPCTypeCheckArgument

src/rpc/server.cpp:69–74  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

67}
68
69void 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
76void RPCTypeCheckObj(const UniValue& o,
77 const std::map<std::string, UniValueType>& typesExpected,

Callers 6

lockunspentFunction · 0.85
listunspentFunction · 0.85
FundTransactionFunction · 0.85
estimatesmartfeeFunction · 0.85
estimaterawfeeFunction · 0.85
RPCTypeCheckFunction · 0.85

Calls 3

JSONRPCErrorFunction · 0.85
uvTypeNameFunction · 0.85
typeMethod · 0.80

Tested by

no test coverage detected