mirror of
https://github.com/aljazceru/breez-lnd.git
synced 2026-02-23 15:34:22 +01:00
lnwallet: properly set auxiliary channel recovery info in NewUnilateralCloseSummary
In this commit, we fix a slight bug by ensuring that the revocation info at the final state of the channel, as well as the local chan config is properly set within the channel close summary created within NewUnilateralCloseSummary. Before this commit, for all cooperative close transactions, this state would _only_ include the pubkey itself, which in some cases may not be sufficient to re-derive the key if needed.
This commit is contained in:
@@ -5094,15 +5094,18 @@ func NewUnilateralCloseSummary(chanState *channeldb.OpenChannel, signer Signer,
|
||||
}
|
||||
|
||||
closeSummary := channeldb.ChannelCloseSummary{
|
||||
ChanPoint: chanState.FundingOutpoint,
|
||||
ChainHash: chanState.ChainHash,
|
||||
ClosingTXID: *commitSpend.SpenderTxHash,
|
||||
CloseHeight: uint32(commitSpend.SpendingHeight),
|
||||
RemotePub: chanState.IdentityPub,
|
||||
Capacity: chanState.Capacity,
|
||||
SettledBalance: btcutil.Amount(localBalance),
|
||||
CloseType: channeldb.RemoteForceClose,
|
||||
IsPending: true,
|
||||
ChanPoint: chanState.FundingOutpoint,
|
||||
ChainHash: chanState.ChainHash,
|
||||
ClosingTXID: *commitSpend.SpenderTxHash,
|
||||
CloseHeight: uint32(commitSpend.SpendingHeight),
|
||||
RemotePub: chanState.IdentityPub,
|
||||
Capacity: chanState.Capacity,
|
||||
SettledBalance: btcutil.Amount(localBalance),
|
||||
CloseType: channeldb.RemoteForceClose,
|
||||
IsPending: true,
|
||||
RemoteCurrentRevocation: chanState.RemoteCurrentRevocation,
|
||||
RemoteNextRevocation: chanState.RemoteNextRevocation,
|
||||
LocalChanConfig: chanState.LocalChanCfg,
|
||||
}
|
||||
|
||||
return &UnilateralCloseSummary{
|
||||
|
||||
Reference in New Issue
Block a user