From d171df51844de0b9feb05bae0d9bd39fa8daaa44 Mon Sep 17 00:00:00 2001 From: Conner Fromknecht Date: Tue, 23 Oct 2018 18:28:20 -0700 Subject: [PATCH] watchtower/wtwire/features: add watchtower feature bits --- watchtower/wtwire/features.go | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 watchtower/wtwire/features.go diff --git a/watchtower/wtwire/features.go b/watchtower/wtwire/features.go new file mode 100644 index 000000000..327a88869 --- /dev/null +++ b/watchtower/wtwire/features.go @@ -0,0 +1,26 @@ +package wtwire + +import "github.com/lightningnetwork/lnd/lnwire" + +// GlobalFeatures holds the globally advertised feature bits understood by +// watchtower implementations. +var GlobalFeatures map[lnwire.FeatureBit]string + +// LocalFeatures holds the locally advertised feature bits understood by +// watchtower implementations. +var LocalFeatures = map[lnwire.FeatureBit]string{ + WtSessionsRequired: "wt-sessions-required", + WtSessionsOptional: "wt-sessions-optional", +} + +const ( + // WtSessionsRequired specifies that the advertising node requires the + // remote party to understand the protocol for creating and updating + // watchtower sessions. + WtSessionsRequired lnwire.FeatureBit = 8 + + // WtSessionsOptional specifies that the advertising node can support + // a remote party who understand the protocol for creating and updating + // watchtower sessions. + WtSessionsOptional lnwire.FeatureBit = 9 +)