multi: optionally enable and signal anchor support

Defaults to disabled.
This commit is contained in:
Johan T. Halseth committed 2020-03-09 12:59:34 +01:00
1 parent 44756b5811
commit 21126ab0f3
7 files changed
+60 -10

No files matched your search

+9 -3
View File
@@ -15,8 +15,14 @@ func (l *ProtocolOptions) LegacyOnion() bool {
return false
}
// LegacyCommitment returns true if the old commitment format should be used
// for new funded channels.
func (l *ProtocolOptions) LegacyCommitment() bool {
// NoStaticRemoteKey returns true if the old commitment format with a tweaked
// remote key should be used for new funded channels.
func (l *ProtocolOptions) NoStaticRemoteKey() bool {
return false
}
// AnchorCommitments returns true if support for the the anchor commitment type
// should be signaled.
func (l *ProtocolOptions) AnchorCommitments() bool {
return false
}
+13 -3
View File
@@ -16,6 +16,10 @@ type ProtocolOptions struct {
// remote party's output in the commitment. If set to true, then we
// won't signal StaticRemoteKeyOptional.
CommitmentTweak bool `long:"committweak" description:"force node to not advertise the new commitment format"`
// Anchors should be set if we want to support opening or accepting
// channels having the anchor commitment type.
Anchors bool `long:"anchors" description:"EXPERIMENTAL: enable experimental support for anchor commitments. Won't work with watchtowers or static channel backups"`
}
// LegacyOnion returns true if the old legacy onion format should be used when
@@ -25,8 +29,14 @@ func (l *ProtocolOptions) LegacyOnion() bool {
return l.LegacyOnionFormat
}
// LegacyCommitment returns true if the old commitment format should be used
// for new funded channels.
func (l *ProtocolOptions) LegacyCommitment() bool {
// NoStaticRemoteKey returns true if the old commitment format with a tweaked
// remote key should be used for new funded channels.
func (l *ProtocolOptions) NoStaticRemoteKey() bool {
return l.CommitmentTweak
}
// AnchorCommitments returns true if support for the the anchor commitment type
// should be signaled.
func (l *ProtocolOptions) AnchorCommitments() bool {
return l.Anchors
}