@@ -133,7 +133,7 @@ object Helpers {
133133 }
134134 val channelFeatures = ChannelFeatures (channelType, localFeatures, remoteFeatures, open.channelFlags.announceChannel)
135135 channelType.commitmentFormat match {
136- case _ : SimpleTaprootChannelCommitmentFormat => if (open.commitNonce_opt.isEmpty) return Left (MissingCommitNonce (open.temporaryChannelId, TxId (ByteVector32 .Zeroes ), commitmentNumber = 0 ))
136+ case _ : TaprootCommitmentFormat => if (open.commitNonce_opt.isEmpty) return Left (MissingCommitNonce (open.temporaryChannelId, TxId (ByteVector32 .Zeroes ), commitmentNumber = 0 ))
137137 case _ : SegwitV0CommitmentFormat => ()
138138 }
139139
@@ -243,7 +243,7 @@ object Helpers {
243243
244244 val channelFeatures = ChannelFeatures (channelType, localFeatures, remoteFeatures, open.channelFlags.announceChannel)
245245 channelType.commitmentFormat match {
246- case _ : SimpleTaprootChannelCommitmentFormat => if (accept.commitNonce_opt.isEmpty) return Left (MissingCommitNonce (open.temporaryChannelId, TxId (ByteVector32 .Zeroes ), commitmentNumber = 0 ))
246+ case _ : TaprootCommitmentFormat => if (accept.commitNonce_opt.isEmpty) return Left (MissingCommitNonce (open.temporaryChannelId, TxId (ByteVector32 .Zeroes ), commitmentNumber = 0 ))
247247 case _ : SegwitV0CommitmentFormat => ()
248248 }
249249 extractShutdownScript(accept.temporaryChannelId, localFeatures, remoteFeatures, accept.upfrontShutdownScript_opt).map(script_opt => (channelFeatures, script_opt))
@@ -295,7 +295,7 @@ object Helpers {
295295 channelType match {
296296 case _ : ChannelTypes .AnchorOutputs | _ : ChannelTypes .AnchorOutputsZeroFeeHtlcTx => remoteFeeratePerKw < FeeratePerKw .MinimumFeeratePerKw
297297 case _ : ChannelTypes .SimpleTaprootChannelsStaging | ChannelTypes .SimpleTaprootChannelsPhoenix => remoteFeeratePerKw < FeeratePerKw .MinimumFeeratePerKw
298- case _ : ChannelTypes .ZeroFeeCommitments => false
298+ case _ : ChannelTypes .ZeroFeeCommitments | _ : ChannelTypes . TaprootZeroFeeCommitments => false
299299 }
300300 }
301301
@@ -558,7 +558,7 @@ object Helpers {
558558 val localNextPerCommitmentPoint = channelKeys.commitmentPoint(commitments.localCommitIndex + 1 )
559559 val localCommitNonces = commitments.active.flatMap(c => c.commitmentFormat match {
560560 case _ : SegwitV0CommitmentFormat => None
561- case _ : SimpleTaprootChannelCommitmentFormat =>
561+ case _ : TaprootCommitmentFormat =>
562562 val fundingKey = channelKeys.fundingKey(c.fundingTxIndex)
563563 val n = NonceGenerator .verificationNonce(c.fundingTxId, fundingKey, c.remoteFundingPubKey, commitments.localCommitIndex + 1 ).publicNonce
564564 Some (c.fundingTxId -> n)
@@ -787,7 +787,7 @@ object Helpers {
787787 val dummySig = IndividualSignature (Transactions .PlaceHolderSig )
788788 val dummySignedTx = dummyTx.aggregateSigs(dummyPubkey, dummyPubkey, dummySig, dummySig)
789789 SimpleClosingTxFee .PaidByUs (Transactions .weight2fee(feerate, dummySignedTx.weight()))
790- case _ : SimpleTaprootChannelCommitmentFormat =>
790+ case _ : TaprootCommitmentFormat =>
791791 val dummySignedTx = dummyTx.tx.updateWitness(dummyTx.inputIndex, Script .witnessKeyPathPay2tr(Transactions .PlaceHolderSig ))
792792 SimpleClosingTxFee .PaidByUs (Transactions .weight2fee(feerate, dummySignedTx.weight()))
793793 }
@@ -803,7 +803,7 @@ object Helpers {
803803 val localFundingKey = channelKeys.fundingKey(commitment.fundingTxIndex)
804804 val localNonces = CloserNonces .generate(localFundingKey.publicKey, commitment.remoteFundingPubKey, commitment.fundingTxId)
805805 val tlvs : TlvStream [ClosingCompleteTlv ] = commitment.commitmentFormat match {
806- case _ : SimpleTaprootChannelCommitmentFormat =>
806+ case _ : TaprootCommitmentFormat =>
807807 remoteNonce_opt match {
808808 case None => return Left (MissingClosingNonce (commitment.channelId))
809809 case Some (remoteNonce) =>
@@ -842,7 +842,7 @@ object Helpers {
842842 // If our output isn't dust, they must provide a signature for a transaction that includes it.
843843 // Note that we're the closee, so we look for signatures including the closee output.
844844 commitment.commitmentFormat match {
845- case _ : SimpleTaprootChannelCommitmentFormat => localNonce_opt match {
845+ case _ : TaprootCommitmentFormat => localNonce_opt match {
846846 case None => Left (MissingClosingNonce (commitment.channelId))
847847 case Some (localNonce) =>
848848 (closingTxs.localAndRemote_opt, closingTxs.localOnly_opt) match {
@@ -1207,7 +1207,7 @@ object Helpers {
12071207 // In that case, we don't need to create a dedicated anchor transaction which avoids using wallet inputs.
12081208 val useMainTxForAnchor = commitment.commitmentFormat match {
12091209 case _ : AnchorOutputsCommitmentFormat | _ : SimpleTaprootChannelCommitmentFormat => false
1210- case ZeroFeeCommitmentFormat =>
1210+ case ZeroFeeCommitmentFormat | TaprootZeroFeeCommitmentFormat =>
12111211 val commitFee = Transactions .weight2fee(feerates.fastest, commitTx.weight())
12121212 mainTx_opt.exists(_.tx.txOut.map(_.amount).sum > commitFee)
12131213 }
@@ -1237,10 +1237,8 @@ object Helpers {
12371237
12381238 /** Claim our main output from the remote commitment transaction, if available. */
12391239 def claimMainOutput (commitKeys : RemoteCommitmentKeys , commitTx : Transaction , dustLimit : Satoshi , commitmentFormat : CommitmentFormat , feerate : FeeratePerKw , finalScriptPubKey : ByteVector )(implicit log : LoggingAdapter ): Option [ClaimRemoteMainOutputTx ] = {
1240- commitmentFormat match {
1241- case _ : AnchorOutputsCommitmentFormat | _ : SimpleTaprootChannelCommitmentFormat | ZeroFeeCommitmentFormat => withTxGenerationLog(" remote-main" ) {
1242- ClaimRemoteMainOutputTx .createUnsignedTx(commitKeys, commitTx, dustLimit, finalScriptPubKey, feerate, commitmentFormat)
1243- }
1240+ withTxGenerationLog(" remote-main" ) {
1241+ ClaimRemoteMainOutputTx .createUnsignedTx(commitKeys, commitTx, dustLimit, finalScriptPubKey, feerate, commitmentFormat)
12441242 }
12451243 }
12461244
@@ -1405,10 +1403,8 @@ object Helpers {
14051403 val feeratePenalty = feerates.fast
14061404
14071405 // First we will claim our main output right away.
1408- val mainTx_opt = commitmentFormat match {
1409- case _ : AnchorOutputsCommitmentFormat | _ : SimpleTaprootChannelCommitmentFormat | ZeroFeeCommitmentFormat => withTxGenerationLog(" remote-main" ) {
1410- ClaimRemoteMainOutputTx .createUnsignedTx(commitKeys, commitTx, dustLimit, finalScriptPubKey, feerateMain, commitmentFormat)
1411- }
1406+ val mainTx_opt = withTxGenerationLog(" remote-main" ) {
1407+ ClaimRemoteMainOutputTx .createUnsignedTx(commitKeys, commitTx, dustLimit, finalScriptPubKey, feerateMain, commitmentFormat)
14121408 }
14131409
14141410 // Then we punish them by stealing their main output.
0 commit comments