mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-03-04 09:48:19 +01: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
1 changed files with 18 additions and 0 deletions
|
@ -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…
Add table
Reference in a new issue