watchtower: add new TaprootCommit Type and flag

This commit adds a new FlagTaprootChannel Flag which is then used to
construct a new blob Type: TypeAltruistTaprootCommit. New watchtower
feature bits are also added (4/5).
This commit is contained in:
Elle Mouton
2023-05-19 11:18:22 +02:00
parent fde982ad78
commit 20a107600f
5 changed files with 82 additions and 24 deletions

View File

@@ -9,6 +9,8 @@ var FeatureNames = map[lnwire.FeatureBit]string{
AltruistSessionsOptional: "altruist-sessions",
AnchorCommitRequired: "anchor-commit",
AnchorCommitOptional: "anchor-commit",
TaprootCommitRequired: "taproot-commit",
TaprootCommitOptional: "taproot-commit",
}
const (
@@ -30,4 +32,13 @@ const (
// AnchorCommitOptional specifies that the advertising tower allows the
// remote party to negotiate sessions for protecting anchor channels.
AnchorCommitOptional lnwire.FeatureBit = 3
// TaprootCommitRequired specifies that the advertising tower requires
// the remote party to negotiate sessions for protecting taproot
// channels.
TaprootCommitRequired lnwire.FeatureBit = 4
// TaprootCommitOptional specifies that the advertising tower allows the
// remote party to negotiate sessions for protecting taproot channels.
TaprootCommitOptional lnwire.FeatureBit = 5
)