lnwallet: properly set the pkScript within an HTLC resolution
This commit is contained in:
parent
927fb2ea0a
commit
2141b481ef
@ -3475,6 +3475,10 @@ func newHtlcResolution(signer Signer, localChanCfg *channeldb.ChannelConfig,
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
htlcScriptHash, err := witnessScriptHash(htlcSweepScript)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
return &OutgoingHtlcResolution{
|
return &OutgoingHtlcResolution{
|
||||||
Expiry: htlc.RefundTimeout,
|
Expiry: htlc.RefundTimeout,
|
||||||
@ -3484,7 +3488,8 @@ func newHtlcResolution(signer Signer, localChanCfg *channeldb.ChannelConfig,
|
|||||||
SingleTweak: commitTweak,
|
SingleTweak: commitTweak,
|
||||||
WitnessScript: htlcSweepScript,
|
WitnessScript: htlcSweepScript,
|
||||||
Output: &wire.TxOut{
|
Output: &wire.TxOut{
|
||||||
Value: int64(secondLevelOutputAmt),
|
PkScript: htlcScriptHash,
|
||||||
|
Value: int64(secondLevelOutputAmt),
|
||||||
},
|
},
|
||||||
HashType: txscript.SigHashAll,
|
HashType: txscript.SigHashAll,
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user