watchtower/wtwire: add AnchorCommit feature bits

Adds the optional/required feature bit pair for negotiating sessions for
anchor channels under features bits 2+3.
This commit is contained in:
Conner Fromknecht 2020-11-25 15:03:49 -08:00
parent ef503bf14e
commit 069296c46c
No known key found for this signature in database
GPG Key ID: E7D737B67FA592C7

@ -7,6 +7,8 @@ import "github.com/lightningnetwork/lnd/lnwire"
var FeatureNames = map[lnwire.FeatureBit]string{ var FeatureNames = map[lnwire.FeatureBit]string{
AltruistSessionsRequired: "altruist-sessions", AltruistSessionsRequired: "altruist-sessions",
AltruistSessionsOptional: "altruist-sessions", AltruistSessionsOptional: "altruist-sessions",
AnchorCommitRequired: "anchor-commit",
AnchorCommitOptional: "anchor-commit",
} }
const ( const (
@ -19,4 +21,13 @@ const (
// support a remote party who understand the protocol for creating and // support a remote party who understand the protocol for creating and
// updating watchtower sessions. // updating watchtower sessions.
AltruistSessionsOptional lnwire.FeatureBit = 1 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
) )