Merge pull request #4782 from cfromknecht/anchor-wtserver
watchtower: anchor channel support
This commit is contained in:
26 files changed
+703
-241
No files matched your search
@@ -112,8 +112,19 @@ var _ SessionNegotiator = (*sessionNegotiator)(nil)
|
||||
|
||||
// newSessionNegotiator initializes a fresh sessionNegotiator instance.
|
||||
func newSessionNegotiator(cfg *NegotiatorConfig) *sessionNegotiator {
|
||||
// Generate the set of features the negitator will present to the tower
|
||||
// upon connection. For anchor channels, we'll conditionally signal that
|
||||
// we require support for anchor channels depdening on the requested
|
||||
// policy.
|
||||
features := []lnwire.FeatureBit{
|
||||
wtwire.AltruistSessionsRequired,
|
||||
}
|
||||
if cfg.Policy.IsAnchorChannel() {
|
||||
features = append(features, wtwire.AnchorCommitRequired)
|
||||
}
|
||||
|
||||
localInit := wtwire.NewInitMessage(
|
||||
lnwire.NewRawFeatureVector(wtwire.AltruistSessionsRequired),
|
||||
lnwire.NewRawFeatureVector(features...),
|
||||
cfg.ChainHash,
|
||||
)
|
||||
|
||||
|
||||
Reference in new issue
Block a user