mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-06-29 02:00:54 +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:
@ -286,6 +286,24 @@ func explicitNegotiateCommitmentType(channelType lnwire.ChannelType, local,
|
|||||||
|
|
||||||
return lnwallet.CommitmentTypeSimpleTaproot, nil
|
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.
|
// No features, use legacy commitment type.
|
||||||
case channelFeatures.IsEmpty():
|
case channelFeatures.IsEmpty():
|
||||||
return lnwallet.CommitmentTypeLegacy, nil
|
return lnwallet.CommitmentTypeLegacy, nil
|
||||||
|
Reference in New Issue
Block a user