watchtower/wtclient: prep client for taproot towers

This commit is contained in:
Elle Mouton committed 2024-01-19 15:33:06 +02:00
1 parent c50aa10194
commit 660f1f361e
7 files changed
+207 -56

No files matched your search

+13
View File
@@ -80,6 +80,19 @@ const (
TypeAltruistTaprootCommit = Type(FlagCommitOutputs | FlagTaprootChannel)
)
// TypeFromChannel returns the appropriate blob Type for the given channel
// type.
func TypeFromChannel(chanType channeldb.ChannelType) Type {
switch {
case chanType.IsTaproot():
return TypeAltruistTaprootCommit
case chanType.HasAnchors():
return TypeAltruistAnchorCommit
default:
return TypeAltruistCommit
}
}
// Identifier returns a unique, stable string identifier for the blob Type.
func (t Type) Identifier() (string, error) {
switch t {