diff --git a/feature/default_sets.go b/feature/default_sets.go index 65e6607b..50b503f8 100644 --- a/feature/default_sets.go +++ b/feature/default_sets.go @@ -43,7 +43,7 @@ var defaultSetDesc = setDesc{ SetNodeAnn: {}, // N SetInvoice: {}, // 9 }, - lnwire.AnchorsOptional: { + lnwire.AnchorsZeroFeeHtlcTxOptional: { SetInit: {}, // I SetNodeAnn: {}, // N }, diff --git a/feature/manager.go b/feature/manager.go index 7e20541e..cbaf8f57 100644 --- a/feature/manager.go +++ b/feature/manager.go @@ -83,8 +83,8 @@ func newManager(cfg Config, desc setDesc) (*Manager, error) { raw.Unset(lnwire.StaticRemoteKeyRequired) } if cfg.NoAnchors { - raw.Unset(lnwire.AnchorsOptional) - raw.Unset(lnwire.AnchorsRequired) + raw.Unset(lnwire.AnchorsZeroFeeHtlcTxOptional) + raw.Unset(lnwire.AnchorsZeroFeeHtlcTxRequired) } if cfg.NoWumbo { raw.Unset(lnwire.WumboChannelsOptional) diff --git a/lnwire/features.go b/lnwire/features.go index 45ef6eeb..279e72c9 100644 --- a/lnwire/features.go +++ b/lnwire/features.go @@ -119,6 +119,16 @@ const ( // outputs. AnchorsOptional FeatureBit = 21 + // AnchorsZeroFeeHtlcTxRequired is a required feature bit that signals + // that the node requires channels having zero-fee second-level HTLC + // transactions, which also imply anchor commitments. + AnchorsZeroFeeHtlcTxRequired FeatureBit = 22 + + // AnchorsZeroFeeHtlcTxRequired is an optional feature bit that signals + // that the node supports channels having zero-fee second-level HTLC + // transactions, which also imply anchor commitments. + AnchorsZeroFeeHtlcTxOptional FeatureBit = 23 + // maxAllowedSize is a maximum allowed size of feature vector. // // NOTE: Within the protocol, the maximum allowed message size is 65535 @@ -158,6 +168,8 @@ var Features = map[FeatureBit]string{ MPPRequired: "multi-path-payments", AnchorsRequired: "anchor-commitments", AnchorsOptional: "anchor-commitments", + AnchorsZeroFeeHtlcTxRequired: "anchors-zero-fee-htlc-tx", + AnchorsZeroFeeHtlcTxOptional: "anchors-zero-fee-htlc-tx", WumboChannelsRequired: "wumbo-channels", WumboChannelsOptional: "wumbo-channels", }