MCPcopy Create free account
hub / github.com/LUX-Core/lux / parseUInt

Function parseUInt

src/rpcwallet.cpp:191–202  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

189}
190
191size_t parseUInt(const UniValue& val, size_t defaultVal) {
192 if (val.isNull()) {
193 return defaultVal;
194 } else {
195 int n = val.get_int();
196 if (n < 0) {
197 throw JSONRPCError(RPC_INVALID_PARAMS, "Expects unsigned integer");
198 }
199
200 return n;
201 }
202}
203
204size_t parseBlockHeight(const UniValue& val) {
205 if (val.isStr()) {

Callers 2

SearchLogsParamsMethod · 0.85
WaitForLogsParamsMethod · 0.85

Calls 3

JSONRPCErrorFunction · 0.85
isNullMethod · 0.45
get_intMethod · 0.45

Tested by

no test coverage detected