htlcswitch: add link operation for initiating quiescence

This commit is contained in:
Keagan McClelland committed 2024-11-26 13:51:57 -07:00
1 parent a085b59814
commit 70e3804121
4 files changed
+45

No files matched your search

+16
View File
@@ -737,6 +737,22 @@ func (l *channelLink) OnCommitOnce(direction LinkDirection, hook func()) {
}
}
// InitStfu allows us to initiate quiescence on this link. It returns a receive
// only channel that will block until quiescence has been achieved, or
// definitively fails.
//
// This operation has been added to allow channels to be quiesced via RPC. It
// may be removed or reworked in the future as RPC initiated quiescence is a
// holdover until we have downstream protocols that use it.
func (l *channelLink) InitStfu() <-chan fn.Result[lntypes.ChannelParty] {
// TODO(proofofkeags): Implement
c := make(chan fn.Result[lntypes.ChannelParty], 1)
c <- fn.Errf[lntypes.ChannelParty]("InitStfu not yet implemented")
return c
}
// isReestablished returns true if the link has successfully completed the
// channel reestablishment dance.
func (l *channelLink) isReestablished() bool {