Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/rpcwallet.cpp
Show First 20 Lines • Show All 2,720 Lines • ▼ Show 20 Lines | return RPCHelpMan{ | ||||
{"txid", UniValueType(UniValue::VSTR)}, | {"txid", UniValueType(UniValue::VSTR)}, | ||||
{"vout", UniValueType(UniValue::VNUM)}, | {"vout", UniValueType(UniValue::VNUM)}, | ||||
}); | }); | ||||
const int nOutput = find_value(o, "vout").get_int(); | const int nOutput = find_value(o, "vout").get_int(); | ||||
if (nOutput < 0) { | if (nOutput < 0) { | ||||
throw JSONRPCError( | throw JSONRPCError( | ||||
RPC_INVALID_PARAMETER, | RPC_INVALID_PARAMETER, | ||||
"Invalid parameter, vout must be positive"); | "Invalid parameter, vout cannot be negative"); | ||||
} | } | ||||
const TxId txid(ParseHashO(o, "txid")); | const TxId txid(ParseHashO(o, "txid")); | ||||
const auto it = pwallet->mapWallet.find(txid); | const auto it = pwallet->mapWallet.find(txid); | ||||
if (it == pwallet->mapWallet.end()) { | if (it == pwallet->mapWallet.end()) { | ||||
throw JSONRPCError( | throw JSONRPCError( | ||||
RPC_INVALID_PARAMETER, | RPC_INVALID_PARAMETER, | ||||
"Invalid parameter, unknown transaction"); | "Invalid parameter, unknown transaction"); | ||||
▲ Show 20 Lines • Show All 2,712 Lines • Show Last 20 Lines |