mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-02-23 14:40:30 +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:
parent
999f4a742c
commit
b06dabfcb9
1 changed files with 12 additions and 9 deletions
|
@ -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{
|
||||
|
|
Loading…
Add table
Reference in a new issue