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

+12
View File
@@ -170,6 +170,18 @@ type ChannelUpdateHandler interface {
// will only ever be called once. If no CommitSig is owed in the
// argument's LinkDirection, then we will call this hook immediately.
OnCommitOnce(LinkDirection, 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. The return value is the
// ChannelParty who holds the role of initiator or Err if the operation
// 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.
InitStfu() <-chan fn.Result[lntypes.ChannelParty]
}
// CommitHookID is a value that is used to uniquely identify hooks in the