diff options
author | MarcoFalke <falke.marco@gmail.com> | 2020-08-30 10:28:42 +0200 |
---|---|---|
committer | fanquake <fanquake@gmail.com> | 2020-10-16 12:06:53 +0800 |
commit | 731502a18385276887a57ad8574fdbaef976920d (patch) | |
tree | 07aaf88f2f9ff790a89f586b6103e8f2877b440f | |
parent | ee0082b886264fcddd73c5bb7c41ba8316527b9c (diff) | |
download | bitcoin-731502a18385276887a57ad8574fdbaef976920d.tar.xz |
rpc: Properly deserialize txs with witness before signing
Github-Pull: #19836
Rebased-From: cccc7525697e7b8d99b545e34f0f504c78ffdb94
-rw-r--r-- | src/rpc/rawtransaction.cpp | 4 | ||||
-rw-r--r-- | src/wallet/rpcwallet.cpp | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/rpc/rawtransaction.cpp b/src/rpc/rawtransaction.cpp index b9ec3c53d6..41d9455e0f 100644 --- a/src/rpc/rawtransaction.cpp +++ b/src/rpc/rawtransaction.cpp @@ -642,7 +642,7 @@ static UniValue combinerawtransaction(const JSONRPCRequest& request) std::vector<CMutableTransaction> txVariants(txs.size()); for (unsigned int idx = 0; idx < txs.size(); idx++) { - if (!DecodeHexTx(txVariants[idx], txs[idx].get_str(), true)) { + if (!DecodeHexTx(txVariants[idx], txs[idx].get_str())) { throw JSONRPCError(RPC_DESERIALIZATION_ERROR, strprintf("TX decode failed for tx %d", idx)); } } @@ -764,7 +764,7 @@ static UniValue signrawtransactionwithkey(const JSONRPCRequest& request) RPCTypeCheck(request.params, {UniValue::VSTR, UniValue::VARR, UniValue::VARR, UniValue::VSTR}, true); CMutableTransaction mtx; - if (!DecodeHexTx(mtx, request.params[0].get_str(), true)) { + if (!DecodeHexTx(mtx, request.params[0].get_str())) { throw JSONRPCError(RPC_DESERIALIZATION_ERROR, "TX decode failed"); } diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index a5036413c8..e537db734e 100644 --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -3309,7 +3309,7 @@ UniValue signrawtransactionwithwallet(const JSONRPCRequest& request) RPCTypeCheck(request.params, {UniValue::VSTR, UniValue::VARR, UniValue::VSTR}, true); CMutableTransaction mtx; - if (!DecodeHexTx(mtx, request.params[0].get_str(), true)) { + if (!DecodeHexTx(mtx, request.params[0].get_str())) { throw JSONRPCError(RPC_DESERIALIZATION_ERROR, "TX decode failed"); } |