Changeset View
Changeset View
Standalone View
Standalone View
src/rpc/avalanche.cpp
Show First 20 Lines • Show All 273 Lines • ▼ Show 20 Lines | for (size_t i = 0; i < stakes.size(); i++) { | ||||
// quoted numerics (which are valid JSON) | // quoted numerics (which are valid JSON) | ||||
{"height", UniValue::VNUM}, | {"height", UniValue::VNUM}, | ||||
{"privatekey", UniValue::VSTR}, | {"privatekey", UniValue::VSTR}, | ||||
}); | }); | ||||
int nOut = find_value(stake, "vout").get_int(); | int nOut = find_value(stake, "vout").get_int(); | ||||
if (nOut < 0) { | if (nOut < 0) { | ||||
throw JSONRPCError(RPC_DESERIALIZATION_ERROR, | throw JSONRPCError(RPC_DESERIALIZATION_ERROR, | ||||
"vout must be positive"); | "vout cannot be negative"); | ||||
} | } | ||||
const int height = find_value(stake, "height").get_int(); | const int height = find_value(stake, "height").get_int(); | ||||
if (height < 1) { | if (height < 1) { | ||||
throw JSONRPCError(RPC_DESERIALIZATION_ERROR, | throw JSONRPCError(RPC_DESERIALIZATION_ERROR, | ||||
"height must be positive"); | "height must be positive"); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 435 Lines • Show Last 20 Lines |