From 069296c46c535fa204279f43e3f60107acf4f45b Mon Sep 17 00:00:00 2001 From: Conner Fromknecht Date: Wed, 25 Nov 2020 15:03:49 -0800 Subject: [PATCH] watchtower/wtwire: add AnchorCommit feature bits Adds the optional/required feature bit pair for negotiating sessions for anchor channels under features bits 2+3. --- watchtower/wtwire/features.go | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/watchtower/wtwire/features.go b/watchtower/wtwire/features.go index 7ba298e0..83ab207f 100644 --- a/watchtower/wtwire/features.go +++ b/watchtower/wtwire/features.go @@ -7,6 +7,8 @@ import "github.com/lightningnetwork/lnd/lnwire" var FeatureNames = map[lnwire.FeatureBit]string{ AltruistSessionsRequired: "altruist-sessions", AltruistSessionsOptional: "altruist-sessions", + AnchorCommitRequired: "anchor-commit", + AnchorCommitOptional: "anchor-commit", } const ( @@ -19,4 +21,13 @@ const ( // support a remote party who understand the protocol for creating and // updating watchtower sessions. AltruistSessionsOptional lnwire.FeatureBit = 1 + + // AnchorCommitRequired specifies that the advertising tower requires + // the remote party to negotiate sessions for protecting anchor + // channels. + AnchorCommitRequired lnwire.FeatureBit = 2 + + // AnchorCommitOptional specifies that the advertising tower allows the + // remote party to negotiate sessions for protecting anchor channels. + AnchorCommitOptional lnwire.FeatureBit = 3 )