Changeset View
Changeset View
Standalone View
Standalone View
src/rpc/rawtransaction.cpp
Show First 20 Lines • Show All 648 Lines • ▼ Show 20 Lines | if (request.fHelp || request.params.size() != 1) { | ||||
" ],\n" | " ],\n" | ||||
"}\n" | "}\n" | ||||
"\nExamples:\n" + | "\nExamples:\n" + | ||||
HelpExampleCli("decoderawtransaction", "\"hexstring\"") + | HelpExampleCli("decoderawtransaction", "\"hexstring\"") + | ||||
HelpExampleRpc("decoderawtransaction", "\"hexstring\"")); | HelpExampleRpc("decoderawtransaction", "\"hexstring\"")); | ||||
} | } | ||||
LOCK(cs_main); | |||||
RPCTypeCheck(request.params, {UniValue::VSTR}); | RPCTypeCheck(request.params, {UniValue::VSTR}); | ||||
CMutableTransaction mtx; | CMutableTransaction mtx; | ||||
if (!DecodeHexTx(mtx, request.params[0].get_str())) { | if (!DecodeHexTx(mtx, request.params[0].get_str())) { | ||||
throw JSONRPCError(RPC_DESERIALIZATION_ERROR, "TX decode failed"); | throw JSONRPCError(RPC_DESERIALIZATION_ERROR, "TX decode failed"); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 1,257 Lines • Show Last 20 Lines |