mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-03-28 10:41:57 +01:00
lnwallet: update NewLocalForceCloseSummary for local taproot output sweep
This commit is contained in:
parent
ad5305b99c
commit
b72f368673
@ -7240,6 +7240,24 @@ func NewLocalForceCloseSummary(chanState *channeldb.OpenChannel,
|
|||||||
},
|
},
|
||||||
MaturityDelay: csvTimeout,
|
MaturityDelay: csvTimeout,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// For taproot channels, we'll need to set some additional
|
||||||
|
// fields to ensure the output can be swept.
|
||||||
|
//
|
||||||
|
// TODO(roasbef): abstract into new func
|
||||||
|
if chanState.ChanType.IsTaproot() {
|
||||||
|
commitResolution.SelfOutputSignDesc.SignMethod =
|
||||||
|
input.TaprootScriptSpendSignMethod
|
||||||
|
|
||||||
|
ctrlBlock := input.MakeTaprootCtrlBlock(
|
||||||
|
commitResolution.SelfOutputSignDesc.WitnessScript,
|
||||||
|
keyRing.RevocationKey, toLocalScript.ScriptTree,
|
||||||
|
)
|
||||||
|
commitResolution.SelfOutputSignDesc.ControlBlock, err = ctrlBlock.ToBytes()
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Once the delay output has been found (if it exists), then we'll also
|
// Once the delay output has been found (if it exists), then we'll also
|
||||||
|
Loading…
x
Reference in New Issue
Block a user