mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-25 18:11:08 +02:00
lnwire+feature: new zero-conf, scid-alias feature bit + chantypes
This defines the zero-conf feature bit, the scid-alias feature bit, the zero-conf channel type, and the scid-alias channel type. It also defines the dependency "tree" that exists for the feature bits. The scid-alias feature bit signals that the node requires an alias short channel id to be sent in funding_locked. The scid-alias channel type requires that the channel is private, in addition to some other forwarding-related privacy measures.
This commit is contained in:
@@ -155,6 +155,16 @@ const (
|
||||
// TODO: Decide on actual feature bit value.
|
||||
ExplicitChannelTypeOptional = 45
|
||||
|
||||
// ScidAliasRequired is a required feature bit that signals that the
|
||||
// node requires understanding of ShortChannelID aliases in the TLV
|
||||
// segment of the funding_locked message.
|
||||
ScidAliasRequired FeatureBit = 46
|
||||
|
||||
// ScidAliasOptional is an optional feature bit that signals that the
|
||||
// node understands ShortChannelID aliases in the TLV segment of the
|
||||
// funding_locked message.
|
||||
ScidAliasOptional FeatureBit = 47
|
||||
|
||||
// PaymentMetadataRequired is a required bit that denotes that if an
|
||||
// invoice contains metadata, it must be passed along with the payment
|
||||
// htlc(s).
|
||||
@@ -165,6 +175,14 @@ const (
|
||||
// htlc(s).
|
||||
PaymentMetadataOptional = 49
|
||||
|
||||
// ZeroConfRequired is a required feature bit that signals that the
|
||||
// node requires understanding of the zero-conf channel_type.
|
||||
ZeroConfRequired FeatureBit = 50
|
||||
|
||||
// ZeroConfOptional is an optional feature bit that signals that the
|
||||
// node understands the zero-conf channel type.
|
||||
ZeroConfOptional FeatureBit = 51
|
||||
|
||||
// KeysendRequired is a required bit that indicates that the node is
|
||||
// able and willing to accept keysend payments.
|
||||
KeysendRequired = 54
|
||||
@@ -173,7 +191,7 @@ const (
|
||||
// able and willing to accept keysend payments.
|
||||
KeysendOptional = 55
|
||||
|
||||
// ScriptEnforcedLeaseRequired is a required feature bit that signals
|
||||
// ScriptEnforcedLeaseOptional is an optional feature bit that signals
|
||||
// that the node requires channels having zero-fee second-level HTLC
|
||||
// transactions, which also imply anchor commitments, along with an
|
||||
// additional CLTV constraint of a channel lease's expiration height
|
||||
@@ -244,6 +262,10 @@ var Features = map[FeatureBit]string{
|
||||
KeysendRequired: "keysend",
|
||||
ScriptEnforcedLeaseRequired: "script-enforced-lease",
|
||||
ScriptEnforcedLeaseOptional: "script-enforced-lease",
|
||||
ScidAliasRequired: "scid-alias",
|
||||
ScidAliasOptional: "scid-alias",
|
||||
ZeroConfRequired: "zero-conf",
|
||||
ZeroConfOptional: "zero-conf",
|
||||
}
|
||||
|
||||
// RawFeatureVector represents a set of feature bits as defined in BOLT-09. A
|
||||
|
Reference in New Issue
Block a user