mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-26 22:26:34 +02:00
lnwallet: fix taproot co-op close nonce bug
The local nonce needs to be the one that's finalized to simulate us receiving the remote nonce, then generating the local nonce in a JIT style.
This commit is contained in:
@@ -44,12 +44,12 @@ func (m *MusigChanCloser) ProposalClosingOpts() (
|
|||||||
|
|
||||||
localKey, remoteKey := m.channel.MultiSigKeys()
|
localKey, remoteKey := m.channel.MultiSigKeys()
|
||||||
m.musigSession = lnwallet.NewPartialMusigSession(
|
m.musigSession = lnwallet.NewPartialMusigSession(
|
||||||
*m.localNonce, localKey, remoteKey,
|
*m.remoteNonce, localKey, remoteKey,
|
||||||
m.channel.Signer, m.channel.FundingTxOut(),
|
m.channel.Signer, m.channel.FundingTxOut(),
|
||||||
lnwallet.RemoteMusigCommit,
|
lnwallet.RemoteMusigCommit,
|
||||||
)
|
)
|
||||||
|
|
||||||
err := m.musigSession.FinalizeSession(*m.remoteNonce)
|
err := m.musigSession.FinalizeSession(*m.localNonce)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user