mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-06-01 18:50:09 +02:00
funding: add support for implicit negotiation for taproot chans
Otherwise, in the itests (which are mainly based on implicit negotiation), we won't try to open taproot chans when we actually need to. We may want to revisit this however, since it may lock in parties trying to use the defaults that aren't currently setting the explicit commit type during funding.
This commit is contained in:
parent
bed9455d60
commit
d98136e850
@ -302,6 +302,16 @@ func implicitNegotiateCommitmentType(local,
|
||||
remote *lnwire.FeatureVector) (*lnwire.ChannelType,
|
||||
lnwallet.CommitmentType) {
|
||||
|
||||
// If both peers are signalling support for taproot chanenls, then
|
||||
// we'll use that type.
|
||||
if hasFeatures(local, remote, lnwire.SimpleTaprootChannelsOptional) {
|
||||
chanType := lnwire.ChannelType(*lnwire.NewRawFeatureVector(
|
||||
lnwire.SimpleTaprootChannelsRequired,
|
||||
))
|
||||
|
||||
return &chanType, lnwallet.CommitmentTypeSimpleTaproot
|
||||
}
|
||||
|
||||
// If both peers are signalling support for anchor commitments with
|
||||
// zero-fee HTLC transactions, we'll use this type.
|
||||
if hasFeatures(local, remote, lnwire.AnchorsZeroFeeHtlcTxOptional) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user