mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-13 18:10:25 +02:00
contractcourt: set auxiliary chan recovery info for all created chan close summaries
This commit is contained in:
@@ -512,6 +512,9 @@ func (c *chainWatcher) dispatchCooperativeClose(commitSpend *chainntnfs.SpendDet
|
||||
CloseType: channeldb.CooperativeClose,
|
||||
ShortChanID: c.cfg.chanState.ShortChanID(),
|
||||
IsPending: false,
|
||||
RemoteCurrentRevocation: c.cfg.chanState.RemoteCurrentRevocation,
|
||||
RemoteNextRevocation: c.cfg.chanState.RemoteNextRevocation,
|
||||
LocalChanConfig: c.cfg.chanState.LocalChanCfg,
|
||||
}
|
||||
err := c.cfg.chanState.CloseChannel(closeSummary)
|
||||
if err != nil && err != channeldb.ErrNoActiveChannels &&
|
||||
@@ -568,6 +571,9 @@ func (c *chainWatcher) dispatchLocalForceClose(
|
||||
IsPending: true,
|
||||
ShortChanID: c.cfg.chanState.ShortChanID(),
|
||||
CloseHeight: uint32(commitSpend.SpendingHeight),
|
||||
RemoteCurrentRevocation: c.cfg.chanState.RemoteCurrentRevocation,
|
||||
RemoteNextRevocation: c.cfg.chanState.RemoteNextRevocation,
|
||||
LocalChanConfig: c.cfg.chanState.LocalChanCfg,
|
||||
}
|
||||
|
||||
// If our commitment output isn't dust or we have active HTLC's on the
|
||||
@@ -749,6 +755,9 @@ func (c *chainWatcher) dispatchContractBreach(spendEvent *chainntnfs.SpendDetail
|
||||
CloseType: channeldb.BreachClose,
|
||||
IsPending: true,
|
||||
ShortChanID: c.cfg.chanState.ShortChanID(),
|
||||
RemoteCurrentRevocation: c.cfg.chanState.RemoteCurrentRevocation,
|
||||
RemoteNextRevocation: c.cfg.chanState.RemoteNextRevocation,
|
||||
LocalChanConfig: c.cfg.chanState.LocalChanCfg,
|
||||
}
|
||||
|
||||
if err := c.cfg.chanState.CloseChannel(&closeSummary); err != nil {
|
||||
|
Reference in New Issue
Block a user