Changeset View
Changeset View
Standalone View
Standalone View
src/rpc/rawtransaction.cpp
Show First 20 Lines • Show All 878 Lines • ▼ Show 20 Lines | RPCTypeCheck( | ||||
request.params, | request.params, | ||||
{UniValue::VSTR, UniValue::VARR, UniValue::VARR, UniValue::VSTR}, true); | {UniValue::VSTR, UniValue::VARR, UniValue::VARR, UniValue::VSTR}, true); | ||||
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"); | ||||
} | } | ||||
CBasicKeyStore keystore; | FillableSigningProvider keystore; | ||||
const UniValue &keys = request.params[1].get_array(); | const UniValue &keys = request.params[1].get_array(); | ||||
for (size_t idx = 0; idx < keys.size(); ++idx) { | for (size_t idx = 0; idx < keys.size(); ++idx) { | ||||
UniValue k = keys[idx]; | UniValue k = keys[idx]; | ||||
CKey key = DecodeSecret(k.get_str()); | CKey key = DecodeSecret(k.get_str()); | ||||
if (!key.IsValid()) { | if (!key.IsValid()) { | ||||
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, | throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, | ||||
"Invalid private key"); | "Invalid private key"); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 1,105 Lines • Show Last 20 Lines |