mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-06-27 01:02:56 +02:00
funding: add explicit chan type support for zeroconf+scid+taproot
We also remove the old implicit negotiation as well, as we'll be updating tests to use explciit when required.
This commit is contained in:
parent
4b65c71213
commit
dd05dd55d4
@ -286,6 +286,24 @@ func explicitNegotiateCommitmentType(channelType lnwire.ChannelType, local,
|
||||
|
||||
return lnwallet.CommitmentTypeSimpleTaproot, nil
|
||||
|
||||
// Simple taproot channels with scid and zero conf.
|
||||
case channelFeatures.OnlyContains(
|
||||
lnwire.SimpleTaprootChannelsRequired,
|
||||
lnwire.ZeroConfRequired,
|
||||
lnwire.ScidAliasRequired,
|
||||
):
|
||||
|
||||
if !hasFeatures(
|
||||
local, remote,
|
||||
lnwire.SimpleTaprootChannelsOptional,
|
||||
lnwire.ZeroConfOptional,
|
||||
) {
|
||||
|
||||
return 0, errUnsupportedChannelType
|
||||
}
|
||||
|
||||
return lnwallet.CommitmentTypeSimpleTaproot, nil
|
||||
|
||||
// No features, use legacy commitment type.
|
||||
case channelFeatures.IsEmpty():
|
||||
return lnwallet.CommitmentTypeLegacy, nil
|
||||
|
Loading…
x
Reference in New Issue
Block a user