feature: add update function for safe feature update
Disallow update of any features that are defined by LND (since just updating the feature, but not the functionality will result in strange behavior). All known feature bits should be toggled using protocol config options.
This commit is contained in:
3 files changed
+163
No files matched your search
@@ -26,8 +26,19 @@ const (
|
||||
// SetInvoiceAmp identifies the features that should be advertised on
|
||||
// AMP invoices generated by the daemon.
|
||||
SetInvoiceAmp
|
||||
|
||||
// setSentinel is used to mark the end of our known sets. This enum
|
||||
// member must *always* be the last item in the iota list to ensure
|
||||
// that validation works as expected.
|
||||
setSentinel
|
||||
)
|
||||
|
||||
// valid returns a boolean indicating whether a set value is one of our
|
||||
// predefined feature sets.
|
||||
func (s Set) valid() bool {
|
||||
return s < setSentinel
|
||||
}
|
||||
|
||||
// String returns a human-readable description of a Set.
|
||||
func (s Set) String() string {
|
||||
switch s {
|
||||
|
||||
Reference in new issue
Block a user