|
|
|
@ -520,13 +520,13 @@ UniValue decoderawtransaction(const JSONRPCRequest& request)
|
|
|
|
|
LOCK(cs_main);
|
|
|
|
|
RPCTypeCheck(request.params, boost::assign::list_of(UniValue::VSTR));
|
|
|
|
|
|
|
|
|
|
CTransaction tx;
|
|
|
|
|
CMutableTransaction mtx;
|
|
|
|
|
|
|
|
|
|
if (!DecodeHexTx(tx, request.params[0].get_str(), true))
|
|
|
|
|
if (!DecodeHexTx(mtx, request.params[0].get_str(), true))
|
|
|
|
|
throw JSONRPCError(RPC_DESERIALIZATION_ERROR, "TX decode failed");
|
|
|
|
|
|
|
|
|
|
UniValue result(UniValue::VOBJ);
|
|
|
|
|
TxToJSON(tx, uint256(), result);
|
|
|
|
|
TxToJSON(CTransaction(std::move(mtx)), uint256(), result);
|
|
|
|
|
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
@ -883,9 +883,10 @@ UniValue sendrawtransaction(const JSONRPCRequest& request)
|
|
|
|
|
RPCTypeCheck(request.params, boost::assign::list_of(UniValue::VSTR)(UniValue::VBOOL));
|
|
|
|
|
|
|
|
|
|
// parse hex string from parameter
|
|
|
|
|
CTransaction tx;
|
|
|
|
|
if (!DecodeHexTx(tx, request.params[0].get_str()))
|
|
|
|
|
CMutableTransaction mtx;
|
|
|
|
|
if (!DecodeHexTx(mtx, request.params[0].get_str()))
|
|
|
|
|
throw JSONRPCError(RPC_DESERIALIZATION_ERROR, "TX decode failed");
|
|
|
|
|
CTransaction tx(std::move(mtx));
|
|
|
|
|
uint256 hashTx = tx.GetHash();
|
|
|
|
|
|
|
|
|
|
bool fLimitFree = false;
|
|
|
|
|