Merge pull request #3789 from cfromknecht/coop-close-rpc-status

republish force and coop closes on startup
This commit is contained in:
Conner Fromknecht authored and GitHub committed 2019-12-05 10:35:53 -08:00
commit f3398c0c0e
8 files changed
+269 -65

No files matched your search

+10
View File
@@ -6394,6 +6394,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.