feature: add feature sets for the wumbo channel feature bit
This commit is contained in:
parent
1b8fd008c4
commit
73cdb6a50f
@ -47,4 +47,8 @@ var defaultSetDesc = setDesc{
|
||||
SetInit: {}, // I
|
||||
SetNodeAnn: {}, // N
|
||||
},
|
||||
lnwire.WumboChannelsOptional: {
|
||||
SetInit: {}, // I
|
||||
SetNodeAnn: {}, // N
|
||||
},
|
||||
}
|
||||
|
@ -20,6 +20,9 @@ type Config struct {
|
||||
|
||||
// NoAnchors unsets any bits signaling support for anchor outputs.
|
||||
NoAnchors bool
|
||||
|
||||
// NoWumbo unsets any bits signalling support for wumbo channels.
|
||||
NoWumbo bool
|
||||
}
|
||||
|
||||
// Manager is responsible for generating feature vectors for different requested
|
||||
@ -36,7 +39,7 @@ func NewManager(cfg Config) (*Manager, error) {
|
||||
return newManager(cfg, defaultSetDesc)
|
||||
}
|
||||
|
||||
// newManager creates a new feeature Manager, applying any custom modifications
|
||||
// newManager creates a new feature Manager, applying any custom modifications
|
||||
// to its feature sets before returning. This method accepts the setDesc as its
|
||||
// own parameter so that it can be unit tested.
|
||||
func newManager(cfg Config, desc setDesc) (*Manager, error) {
|
||||
@ -83,6 +86,10 @@ func newManager(cfg Config, desc setDesc) (*Manager, error) {
|
||||
raw.Unset(lnwire.AnchorsOptional)
|
||||
raw.Unset(lnwire.AnchorsRequired)
|
||||
}
|
||||
if cfg.NoWumbo {
|
||||
raw.Unset(lnwire.WumboChannelsOptional)
|
||||
raw.Unset(lnwire.WumboChannelsRequired)
|
||||
}
|
||||
|
||||
// Ensure that all of our feature sets properly set any
|
||||
// dependent features.
|
||||
|
Loading…
Reference in New Issue
Block a user