htlcswitch+peer: allow the disabling of quiescence

Here we add a flag where we can disable quiescence. This will be used
in the case where the feature is not negotiated with our peer.
This commit is contained in:
Keagan McClelland
2024-08-09 20:33:34 -07:00
parent 48ee643c0d
commit 111c9b05f3
7 changed files with 49 additions and 9 deletions

View File

@@ -73,6 +73,9 @@ type ProtocolOptions struct {
// NoExperimentalEndorsementOption disables experimental endorsement.
NoExperimentalEndorsementOption bool `long:"no-experimental-endorsement" description:"do not forward experimental endorsement signals"`
// NoQuiescenceOption disables quiescence for all channels.
NoQuiescenceOption bool `long:"no-quiescence" description:"do not allow or advertise quiescence for any channel"`
// CustomMessage allows the custom message APIs to handle messages with
// the provided protocol numbers, which fall outside the custom message
// number range.
@@ -136,6 +139,11 @@ func (l *ProtocolOptions) NoExperimentalEndorsement() bool {
return l.NoExperimentalEndorsementOption
}
// NoQuiescence returns true if quiescence is disabled.
func (l *ProtocolOptions) NoQuiescence() bool {
return l.NoQuiescenceOption
}
// CustomMessageOverrides returns the set of protocol messages that we override
// to allow custom handling.
func (l ProtocolOptions) CustomMessageOverrides() []uint16 {