multi: add experimental endorsement feature bit and disable option

This commit is contained in:
Carla Kirk-Cohen
2024-05-22 09:17:58 -04:00
parent 4bb5b0c27c
commit f02bb58486
8 changed files with 66 additions and 13 deletions

View File

@@ -70,6 +70,9 @@ type ProtocolOptions struct {
// NoRouteBlindingOption disables forwarding of payments in blinded routes.
NoRouteBlindingOption bool `long:"no-route-blinding" description:"do not forward payments that are a part of a blinded route"`
// NoExperimentalEndorsementOption disables experimental endorsement.
NoExperimentalEndorsementOption bool `long:"no-experimental-endorsement" description:"do not forward experimental endorsement signals"`
// CustomMessage allows the custom message APIs to handle messages with
// the provided protocol numbers, which fall outside the custom message
// number range.
@@ -127,6 +130,12 @@ func (l *ProtocolOptions) NoRouteBlinding() bool {
return l.NoRouteBlindingOption
}
// NoExperimentalEndorsement returns true if experimental endorsement should
// be disabled.
func (l *ProtocolOptions) NoExperimentalEndorsement() bool {
return l.NoExperimentalEndorsementOption
}
// CustomMessageOverrides returns the set of protocol messages that we override
// to allow custom handling.
func (l ProtocolOptions) CustomMessageOverrides() []uint16 {