feature+lncfg: add config option to turn of anysegwit

This commit is contained in:
Olaoluwa Osuntokun
2022-08-04 19:09:39 -07:00
parent fffad49ad1
commit 89529fbb4f
5 changed files with 34 additions and 0 deletions

View File

@@ -40,6 +40,10 @@ type Config struct {
// channels. This should be used instead of NoOptionScidAlias to still
// keep option-scid-alias support.
NoZeroConf bool
// NoAnySegwit unsets any bits that signal support for using other
// segwit witness versions for co-op closes.
NoAnySegwit bool
}
// Manager is responsible for generating feature vectors for different requested
@@ -142,6 +146,10 @@ func newManager(cfg Config, desc setDesc) (*Manager, error) {
raw.Unset(lnwire.ZeroConfOptional)
raw.Unset(lnwire.ZeroConfRequired)
}
if cfg.NoAnySegwit {
raw.Unset(lnwire.ShutdownAnySegwitOptional)
raw.Unset(lnwire.ShutdownAnySegwitRequired)
}
// Ensure that all of our feature sets properly set any
// dependent features.