mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-08-27 14:11:04 +02:00
multi: add experimental endorsement feature bit and disable option
This commit is contained in:
@@ -96,4 +96,7 @@ var defaultSetDesc = setDesc{
|
||||
SetInit: {}, // I
|
||||
SetNodeAnn: {}, // N
|
||||
},
|
||||
lnwire.ExperimentalEndorsementOptional: {
|
||||
SetNodeAnn: {}, // N
|
||||
},
|
||||
}
|
||||
|
@@ -66,6 +66,10 @@ type Config struct {
|
||||
// NoTaprootOverlay unsets the taproot overlay channel feature bits.
|
||||
NoTaprootOverlay bool
|
||||
|
||||
// NoExperimentalEndorsement unsets any bits that signal support for
|
||||
// forwarding experimental endorsement.
|
||||
NoExperimentalEndorsement bool
|
||||
|
||||
// CustomFeatures is a set of custom features to advertise in each
|
||||
// set.
|
||||
CustomFeatures map[Set][]lnwire.FeatureBit
|
||||
@@ -199,6 +203,12 @@ func newManager(cfg Config, desc setDesc) (*Manager, error) {
|
||||
raw.Unset(lnwire.SimpleTaprootOverlayChansOptional)
|
||||
raw.Unset(lnwire.SimpleTaprootOverlayChansRequired)
|
||||
}
|
||||
|
||||
if cfg.NoExperimentalEndorsement {
|
||||
raw.Unset(lnwire.ExperimentalEndorsementOptional)
|
||||
raw.Unset(lnwire.ExperimentalEndorsementRequired)
|
||||
}
|
||||
|
||||
for _, custom := range cfg.CustomFeatures[set] {
|
||||
if custom > set.Maximum() {
|
||||
return nil, fmt.Errorf("feature bit: %v "+
|
||||
|
Reference in New Issue
Block a user