mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-08-31 17:51:33 +02:00
watchtower/wtclient: prep client for taproot towers
This commit is contained in:
@@ -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 {
|
||||
|
Reference in New Issue
Block a user