peer+chancloser: mark coop broadcasted

This commit is contained in:
Conner Fromknecht committed 2019-12-04 14:25:28 -08:00
1 parent b3c28c9cba
commit d9cf0396b3
3 files changed
+13 -2

No files matched your search

+10
View File
@@ -6382,6 +6382,16 @@ func (lc *LightningChannel) MarkCommitmentBroadcasted(tx *wire.MsgTx) error {
return lc.channelState.MarkCommitmentBroadcasted(tx)
}
// MarkCoopBroadcasted marks the channel as a cooperative close transaction has
// been broadcast, and that we should watch the chain for it to confirm before
// taking any further action.
func (lc *LightningChannel) MarkCoopBroadcasted(tx *wire.MsgTx) error {
lc.Lock()
defer lc.Unlock()
return lc.channelState.MarkCoopBroadcasted(tx)
}
// MarkDataLoss marks sets the channel status to LocalDataLoss and stores the
// passed commitPoint for use to retrieve funds in case the remote force closes
// the channel.