mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-30 21:42:39 +02:00
channeldb: add new db type for taproot channels
This commit is contained in:
@@ -303,6 +303,10 @@ const (
|
|||||||
// ScidAliasFeatureBit indicates that the scid-alias feature bit was
|
// ScidAliasFeatureBit indicates that the scid-alias feature bit was
|
||||||
// negotiated during the lifetime of this channel.
|
// negotiated during the lifetime of this channel.
|
||||||
ScidAliasFeatureBit ChannelType = 1 << 9
|
ScidAliasFeatureBit ChannelType = 1 << 9
|
||||||
|
|
||||||
|
// SimpleTaprootFeatureBit indicates that the simple-taproot-channels
|
||||||
|
// feature bit was negotiated during the lifetime of the channel.
|
||||||
|
SimpleTaprootFeatureBit ChannelType = 1 << 10
|
||||||
)
|
)
|
||||||
|
|
||||||
// IsSingleFunder returns true if the channel type if one of the known single
|
// IsSingleFunder returns true if the channel type if one of the known single
|
||||||
@@ -368,6 +372,11 @@ func (c ChannelType) HasScidAliasFeature() bool {
|
|||||||
return c&ScidAliasFeatureBit == ScidAliasFeatureBit
|
return c&ScidAliasFeatureBit == ScidAliasFeatureBit
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// IsTaproot returns true if the channel is using taproot features.
|
||||||
|
func (c ChannelType) IsTaproot() bool {
|
||||||
|
return c&SimpleTaprootFeatureBit == SimpleTaprootFeatureBit
|
||||||
|
}
|
||||||
|
|
||||||
// ChannelConstraints represents a set of constraints meant to allow a node to
|
// ChannelConstraints represents a set of constraints meant to allow a node to
|
||||||
// limit their exposure, enact flow control and ensure that all HTLCs are
|
// limit their exposure, enact flow control and ensure that all HTLCs are
|
||||||
// economically relevant. This struct will be mirrored for both sides of the
|
// economically relevant. This struct will be mirrored for both sides of the
|
||||||
|
Reference in New Issue
Block a user