lnwire+feature: add awareness of option_shutdown_anysegwit

In this commit, we add awareness of the option_shutdown_anysegwit that
permits both sides to send newer segwit based addresses. This'll
eventually enable us to send taproot addresses for co-op close.
This commit is contained in:
Olaoluwa Osuntokun 2022-06-10 11:14:54 -07:00
parent 17014b592e
commit 5f9c1b902f
No known key found for this signature in database
GPG Key ID: 3BBD59E99B280306
2 changed files with 18 additions and 0 deletions

View File

@ -79,4 +79,8 @@ var defaultSetDesc = setDesc{
SetInit: {}, // I
SetNodeAnn: {}, // N
},
lnwire.ShutdownAnySegwitOptional: {
SetInit: {}, // I
SetNodeAnn: {}, // N
},
}

View File

@ -129,6 +129,18 @@ const (
// transactions, which also imply anchor commitments.
AnchorsZeroFeeHtlcTxOptional FeatureBit = 23
// ShutdownAnySegwitRequired is an required feature bit that signals
// that the sender is able to properly handle/parse segwit witness
// programs up to version 16. This enables utilization of Taproot
// addresses for cooperative closure addresses.
ShutdownAnySegwitRequired FeatureBit = 26
// ShutdownAnySegwitOptional is an optional feature bit that signals
// that the sender is able to properly handle/parse segwit witness
// programs up to version 16. This enables utilization of Taproot
// addresses for cooperative closure addresses.
ShutdownAnySegwitOptional FeatureBit = 27
// AMPRequired is a required feature bit that signals that the receiver
// of a payment supports accepts spontaneous payments, i.e.
// sender-generated preimages according to BOLT XX.
@ -266,6 +278,8 @@ var Features = map[FeatureBit]string{
ScidAliasOptional: "scid-alias",
ZeroConfRequired: "zero-conf",
ZeroConfOptional: "zero-conf",
ShutdownAnySegwitRequired: "shutdown-any-segwit",
ShutdownAnySegwitOptional: "shutdown-any-segwit",
}
// RawFeatureVector represents a set of feature bits as defined in BOLT-09. A