mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-06-14 19:01:10 +02:00
lnwallet: properly set witness script in CommitScriptToSelf
This commit is contained in:
parent
a5f67b451e
commit
0d3bed66c0
@ -209,7 +209,7 @@ func CommitScriptToSelf(chanType channeldb.ChannelType, initiator bool,
|
|||||||
//
|
//
|
||||||
// Our "redeem" script here is just the taproot witness program.
|
// Our "redeem" script here is just the taproot witness program.
|
||||||
case chanType.IsTaproot():
|
case chanType.IsTaproot():
|
||||||
toLocalOutputKey, err := input.TaprootCommitScriptToSelf(
|
toLocalScriptTree, err := input.NewLocalCommitScriptTree(
|
||||||
csvDelay, selfKey, revokeKey,
|
csvDelay, selfKey, revokeKey,
|
||||||
)
|
)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -218,7 +218,7 @@ func CommitScriptToSelf(chanType channeldb.ChannelType, initiator bool,
|
|||||||
}
|
}
|
||||||
|
|
||||||
toLocalPkScript, err := input.PayToTaprootScript(
|
toLocalPkScript, err := input.PayToTaprootScript(
|
||||||
toLocalOutputKey,
|
toLocalScriptTree.TaprootKey,
|
||||||
)
|
)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("unable to gen taproot "+
|
return nil, fmt.Errorf("unable to gen taproot "+
|
||||||
@ -226,6 +226,7 @@ func CommitScriptToSelf(chanType channeldb.ChannelType, initiator bool,
|
|||||||
}
|
}
|
||||||
|
|
||||||
return &ScriptInfo{
|
return &ScriptInfo{
|
||||||
|
WitnessScript: toLocalScriptTree.SettleLeaf.Script,
|
||||||
PkScript: toLocalPkScript,
|
PkScript: toLocalPkScript,
|
||||||
}, nil
|
}, nil
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user