multi: use prev output fetcher in sign desc

pull/70/head
Oliver Gugger 1 year ago
parent bd794843b3
commit 2e9a0f8dbe
No known key found for this signature in database
GPG Key ID: 8E4256593F177720

@ -227,6 +227,7 @@ func sweepRemoteClosed(extendedKey *hdkeychain.ExtendedKey, apiURL,
WitnessScript: target.script, WitnessScript: target.script,
Output: prevTxOut, Output: prevTxOut,
HashType: txscript.SigHashAll, HashType: txscript.SigHashAll,
PrevOutputFetcher: prevOutFetcher,
}) })
} }
} }

@ -274,6 +274,7 @@ func sweepTimeLock(extendedKey *hdkeychain.ExtendedKey, apiURL string,
WitnessScript: script, WitnessScript: script,
Output: prevTxOut, Output: prevTxOut,
HashType: txscript.SigHashAll, HashType: txscript.SigHashAll,
PrevOutputFetcher: prevOutFetcher,
} }
totalOutputValue += target.value totalOutputValue += target.value
signDescs = append(signDescs, signDesc) signDescs = append(signDescs, signDesc)

@ -273,6 +273,7 @@ func sweepTimeLockManual(extendedKey *hdkeychain.ExtendedKey, apiURL string,
}, },
InputIndex: 0, InputIndex: 0,
SigHashes: sigHashes, SigHashes: sigHashes,
PrevOutputFetcher: prevOutFetcher,
HashType: txscript.SigHashAll, HashType: txscript.SigHashAll,
} }
witness, err := input.CommitSpendTimeout(signer, signDesc, sweepTx) witness, err := input.CommitSpendTimeout(signer, signDesc, sweepTx)

@ -140,6 +140,7 @@ func (s *Signer) AddPartialSignature(packet *psbt.Packet,
Output: utxo, Output: utxo,
InputIndex: inputIndex, InputIndex: inputIndex,
HashType: txscript.SigHashAll, HashType: txscript.SigHashAll,
PrevOutputFetcher: prevOutFetcher,
SigHashes: txscript.NewTxSigHashes( SigHashes: txscript.NewTxSigHashes(
packet.UnsignedTx, prevOutFetcher, packet.UnsignedTx, prevOutFetcher,
), ),

Loading…
Cancel
Save