mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-03-04 01:36:24 +01:00
lnwallet: don't re-use sign descriptor
Fixes an issue where re-using a sign descriptor in a loop carried over signing information from one call to the next, which caused the remote signing issue.
This commit is contained in:
parent
e4f3a35c0c
commit
a2a96c7712
1 changed files with 5 additions and 6 deletions
|
@ -110,13 +110,12 @@ func (f *FullIntent) CompileFundingTx(extraInputs []*wire.TxIn,
|
|||
prevOutFetcher := NewSegWitV0DualFundingPrevOutputFetcher(
|
||||
f.coinSource, extraInputs,
|
||||
)
|
||||
sigHashes := txscript.NewTxSigHashes(fundingTx, prevOutFetcher)
|
||||
for i, txIn := range fundingTx.TxIn {
|
||||
signDesc := input.SignDescriptor{
|
||||
SigHashes: txscript.NewTxSigHashes(
|
||||
fundingTx, prevOutFetcher,
|
||||
),
|
||||
SigHashes: sigHashes,
|
||||
PrevOutputFetcher: prevOutFetcher,
|
||||
}
|
||||
for i, txIn := range fundingTx.TxIn {
|
||||
// We can only sign this input if it's ours, so we'll ask the
|
||||
// coin source if it can map this outpoint into a coin we own.
|
||||
// If not, then we'll continue as it isn't our input.
|
||||
|
|
Loading…
Add table
Reference in a new issue