From 9145c0fd38b8e63e350b6c195c949ed90c723463 Mon Sep 17 00:00:00 2001 From: Olaoluwa Osuntokun Date: Tue, 30 Jul 2019 21:53:02 -0700 Subject: [PATCH] lnwire: add new TLV onion feature bits --- lnwire/features.go | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/lnwire/features.go b/lnwire/features.go index 1dd536ba6..4cdbd0545 100644 --- a/lnwire/features.go +++ b/lnwire/features.go @@ -46,6 +46,15 @@ const ( // efficient network view reconciliation. GossipQueriesOptional FeatureBit = 7 + // TLVOnionPayloadRequired is a feature bit that indicates a node is + // able to decode the new TLV information included in the onion packet. + TLVOnionPayloadRequired FeatureBit = 8 + + // TLVOnionPayloadRequired is an optional feature bit that indicates a + // node is able to decode the new TLV information included in the onion + // packet. + TLVOnionPayloadOptional FeatureBit = 9 + // maxAllowedSize is a maximum allowed size of feature vector. // // NOTE: Within the protocol, the maximum allowed message size is 65535 @@ -76,7 +85,10 @@ var LocalFeatures = map[FeatureBit]string{ // name. All known global feature bits must be assigned a name in this mapping. // Global features are those which are advertised to the entire network. A full // description of these feature bits is provided in the BOLT-09 specification. -var GlobalFeatures map[FeatureBit]string +var GlobalFeatures = map[FeatureBit]string{ + TLVOnionPayloadRequired: "tlv-onion", + TLVOnionPayloadOptional: "tlv-onion", +} // RawFeatureVector represents a set of feature bits as defined in BOLT-09. A // RawFeatureVector itself just stores a set of bit flags but can be used to