mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-14 12:43:40 +02:00
Fix bug in converttopsbt
This commit is contained in:
parent
bb80fd1602
commit
c8525c9387
1 changed files with 2 additions and 2 deletions
|
|
@ -1765,13 +1765,13 @@ UniValue converttopsbt(const JSONRPCRequest& request)
|
|||
|
||||
// Remove all scriptSigs and scriptWitnesses from inputs
|
||||
for (CTxIn& input : tx.vin) {
|
||||
if ((!input.scriptSig.empty()) && (request.params[1].isNull() || (!request.params[1].isNull() && request.params[1].get_bool()))) {
|
||||
if (!input.scriptSig.empty() && !permitsigdata) {
|
||||
throw JSONRPCError(RPC_DESERIALIZATION_ERROR, "Inputs must not have scriptSigs");
|
||||
}
|
||||
input.scriptSig.clear();
|
||||
}
|
||||
for (CTxInWitness& witness: tx.witness.vtxinwit) {
|
||||
if ((!witness.scriptWitness.IsNull()) && (request.params[1].isNull() || (!request.params[1].isNull() && request.params[1].get_bool()))) {
|
||||
if (!witness.scriptWitness.IsNull() && !permitsigdata) {
|
||||
throw JSONRPCError(RPC_DESERIALIZATION_ERROR, "Inputs must not have scriptWitnesses");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue