diff options
author | Gregory Sanders <gsanders87@gmail.com> | 2018-09-29 22:09:15 -0400 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2018-12-05 17:38:57 -0500 |
commit | 7a590d8390ef2158509c4fc08b84dac71f59e1fb (patch) | |
tree | f476f0184ede38f5a2277797fea93dd6defc9feb /src/rpc | |
parent | 5d12143c730c3dcd11bb9dce16ed43a15a16eea2 (diff) |
fix converttopsbt permitsigdata arg, add basic test
Github-Pull: #14356
Rebased-From: 88a79cb436b30b39d37d139da723f5a31e9d161b
Diffstat (limited to 'src/rpc')
-rw-r--r-- | src/rpc/rawtransaction.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/rpc/rawtransaction.cpp b/src/rpc/rawtransaction.cpp index 7de3638f4e..0925b1c0cf 100644 --- a/src/rpc/rawtransaction.cpp +++ b/src/rpc/rawtransaction.cpp @@ -1778,7 +1778,7 @@ UniValue converttopsbt(const JSONRPCRequest& request) // Remove all scriptSigs and scriptWitnesses from inputs for (CTxIn& input : tx.vin) { - if ((!input.scriptSig.empty() || !input.scriptWitness.IsNull()) && (request.params[1].isNull() || (!request.params[1].isNull() && request.params[1].get_bool()))) { + if ((!input.scriptSig.empty() || !input.scriptWitness.IsNull()) && !permitsigdata) { throw JSONRPCError(RPC_DESERIALIZATION_ERROR, "Inputs must not have scriptSigs and scriptWitnesses"); } input.scriptSig.clear(); |