Skip to content

Commit ac48c48

Browse files
committed
Split commit nonces from funding nonce in tx_complete
The commit nonces and funding nonce provided in `tx_complete` are actually completely orthogonal: - the commit nonces must be provided whenever the *next* commitment format is using taproot - the funding nonce must be provided whenever the *previous* commitment format is using taproot It thus makes more sense to split them into separate TLVs.
1 parent d8ce91b commit ac48c48

File tree

7 files changed

+60
-48
lines changed

7 files changed

+60
-48
lines changed

eclair-core/src/main/scala/fr/acinq/eclair/channel/fund/InteractiveTxBuilder.scala

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -720,7 +720,7 @@ private class InteractiveTxBuilder(replyTo: ActorRef[InteractiveTxBuilder.Respon
720720
replyTo ! RemoteFailure(cause)
721721
unlockAndStop(session)
722722
case Right(completeTx) =>
723-
signCommitTx(completeTx, session.txCompleteReceived.flatMap(_.nonces_opt))
723+
signCommitTx(completeTx, session.txCompleteReceived.flatMap(_.fundingNonce_opt), session.txCompleteReceived.flatMap(_.commitNonces_opt))
724724
}
725725
case _: WalletFailure =>
726726
replyTo ! RemoteFailure(UnconfirmedInteractiveTxInputs(fundingParams.channelId))
@@ -797,7 +797,7 @@ private class InteractiveTxBuilder(replyTo: ActorRef[InteractiveTxBuilder.Respon
797797
case _: SegwitV0CommitmentFormat => ()
798798
case _: SimpleTaprootChannelCommitmentFormat =>
799799
// If we're spending a taproot channel, our peer must provide a nonce for the shared input.
800-
val remoteFundingNonce_opt: Option[IndividualNonce] = session.txCompleteReceived.flatMap(_.nonces_opt).flatMap(_.fundingNonce_opt)
800+
val remoteFundingNonce_opt = session.txCompleteReceived.flatMap(_.fundingNonce_opt)
801801
if (remoteFundingNonce_opt.isEmpty) return Left(MissingFundingNonce(fundingParams.channelId, sharedInput.info.outPoint.txid))
802802
}
803803
sharedInputs.headOption match {
@@ -819,7 +819,7 @@ private class InteractiveTxBuilder(replyTo: ActorRef[InteractiveTxBuilder.Respon
819819
fundingParams.commitmentFormat match {
820820
case _: SegwitV0CommitmentFormat => ()
821821
case _: SimpleTaprootChannelCommitmentFormat =>
822-
val remoteCommitNonces_opt = session.txCompleteReceived.flatMap(_.nonces_opt)
822+
val remoteCommitNonces_opt = session.txCompleteReceived.flatMap(_.commitNonces_opt)
823823
if (remoteCommitNonces_opt.isEmpty) return Left(MissingCommitNonce(fundingParams.channelId, tx.txid, purpose.remoteCommitIndex))
824824
}
825825

@@ -888,7 +888,7 @@ private class InteractiveTxBuilder(replyTo: ActorRef[InteractiveTxBuilder.Respon
888888
Right(sharedTx)
889889
}
890890

891-
private def signCommitTx(completeTx: SharedTransaction, remoteNonces_opt: Option[TxCompleteTlv.Nonces]): Behavior[Command] = {
891+
private def signCommitTx(completeTx: SharedTransaction, remoteFundingNonce_opt: Option[IndividualNonce], remoteCommitNonces_opt: Option[TxCompleteTlv.CommitNonces]): Behavior[Command] = {
892892
val fundingTx = completeTx.buildUnsignedTx()
893893
val fundingOutputIndex = fundingTx.txOut.indexWhere(_.publicKeyScript == fundingPubkeyScript)
894894
val liquidityFee = fundingParams.liquidityFees(liquidityPurchase_opt)
@@ -914,7 +914,7 @@ private class InteractiveTxBuilder(replyTo: ActorRef[InteractiveTxBuilder.Respon
914914
val localSigOfRemoteTx = fundingParams.commitmentFormat match {
915915
case _: SegwitV0CommitmentFormat => Right(remoteCommitTx.sign(localFundingKey, fundingParams.remoteFundingPubKey))
916916
case _: SimpleTaprootChannelCommitmentFormat =>
917-
remoteNonces_opt match {
917+
remoteCommitNonces_opt match {
918918
case Some(remoteNonces) =>
919919
val localNonce = NonceGenerator.signingNonce(localFundingKey.publicKey, fundingParams.remoteFundingPubKey, fundingTx.txid)
920920
remoteCommitTx.partialSign(localFundingKey, fundingParams.remoteFundingPubKey, localNonce, Seq(localNonce.publicNonce, remoteNonces.commitNonce)) match {
@@ -933,13 +933,13 @@ private class InteractiveTxBuilder(replyTo: ActorRef[InteractiveTxBuilder.Respon
933933
val localCommitSig = CommitSig(fundingParams.channelId, localSigOfRemoteTx, htlcSignatures, batchSize = 1)
934934
val localCommit = UnsignedLocalCommit(purpose.localCommitIndex, localSpec, localCommitTx.tx.txid)
935935
val remoteCommit = RemoteCommit(purpose.remoteCommitIndex, remoteSpec, remoteCommitTx.tx.txid, purpose.remotePerCommitmentPoint)
936-
signFundingTx(completeTx, remoteNonces_opt, localCommitSig, localCommit, remoteCommit)
936+
signFundingTx(completeTx, remoteFundingNonce_opt, remoteCommitNonces_opt.map(_.nextCommitNonce), localCommitSig, localCommit, remoteCommit)
937937
}
938938
}
939939
}
940940

941-
private def signFundingTx(completeTx: SharedTransaction, remoteNonces_opt: Option[TxCompleteTlv.Nonces], commitSig: CommitSig, localCommit: UnsignedLocalCommit, remoteCommit: RemoteCommit): Behavior[Command] = {
942-
signTx(completeTx, remoteNonces_opt.flatMap(_.fundingNonce_opt))
941+
private def signFundingTx(completeTx: SharedTransaction, remoteFundingNonce_opt: Option[IndividualNonce], nextRemoteCommitNonce_opt: Option[IndividualNonce], commitSig: CommitSig, localCommit: UnsignedLocalCommit, remoteCommit: RemoteCommit): Behavior[Command] = {
942+
signTx(completeTx, remoteFundingNonce_opt)
943943
Behaviors.receiveMessagePartial {
944944
case SignTransactionResult(signedTx) =>
945945
log.info(s"interactive-tx txid=${signedTx.txId} partially signed with {} local inputs, {} remote inputs, {} local outputs and {} remote outputs", signedTx.tx.localInputs.length, signedTx.tx.remoteInputs.length, signedTx.tx.localOutputs.length, signedTx.tx.remoteOutputs.length)
@@ -976,8 +976,7 @@ private class InteractiveTxBuilder(replyTo: ActorRef[InteractiveTxBuilder.Respon
976976
remoteCommit,
977977
liquidityPurchase_opt.map(_.basicInfo(isBuyer = fundingParams.isInitiator))
978978
)
979-
val nextRemoteCommitNonce_opt = remoteNonces_opt.map(n => signedTx.txId -> n.nextCommitNonce)
980-
replyTo ! Succeeded(signingSession, commitSig, liquidityPurchase_opt, nextRemoteCommitNonce_opt)
979+
replyTo ! Succeeded(signingSession, commitSig, liquidityPurchase_opt, nextRemoteCommitNonce_opt.map(n => signedTx.txId -> n))
981980
Behaviors.stopped
982981
case WalletFailure(t) =>
983982
log.error("could not sign funding transaction: ", t)

eclair-core/src/main/scala/fr/acinq/eclair/wire/protocol/InteractiveTxTlv.scala

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import fr.acinq.eclair.channel.ChannelSpendSignature.PartialSignatureWithNonce
2323
import fr.acinq.eclair.wire.protocol.CommonCodecs._
2424
import fr.acinq.eclair.wire.protocol.TlvCodecs.{tlvField, tlvStream}
2525
import scodec.Codec
26-
import scodec.codecs.{bitsRemaining, discriminated, optional}
26+
import scodec.codecs.discriminated
2727

2828
/**
2929
* Created by t-bast on 08/04/2022.
@@ -63,21 +63,28 @@ sealed trait TxCompleteTlv extends Tlv
6363

6464
object TxCompleteTlv {
6565
/**
66-
* Musig2 nonces exchanged during an interactive tx session, when using a taproot channel or upgrading a channel to
67-
* use taproot.
66+
* Musig2 nonces for the commitment transaction(s), exchanged during an interactive tx session, when using a taproot
67+
* channel or upgrading a channel to use taproot.
6868
*
69-
* @param commitNonce the sender's verification nonce for the current commit tx spending the interactive tx.
70-
* @param nextCommitNonce the sender's verification nonce for the next commit tx spending the interactive tx.
71-
* @param fundingNonce_opt when splicing a taproot channel, the sender's random signing nonce for the previous funding output.
69+
* @param commitNonce the sender's verification nonce for the current commit tx spending the interactive tx.
70+
* @param nextCommitNonce the sender's verification nonce for the next commit tx spending the interactive tx.
7271
*/
73-
case class Nonces(commitNonce: IndividualNonce, nextCommitNonce: IndividualNonce, fundingNonce_opt: Option[IndividualNonce]) extends TxCompleteTlv
72+
case class CommitNonces(commitNonce: IndividualNonce, nextCommitNonce: IndividualNonce) extends TxCompleteTlv
7473

75-
object Nonces {
76-
val codec: Codec[Nonces] = tlvField((publicNonce :: publicNonce :: optional(bitsRemaining, publicNonce)).as[Nonces])
74+
object CommitNonces {
75+
val codec: Codec[CommitNonces] = tlvField((publicNonce :: publicNonce).as[CommitNonces])
76+
}
77+
78+
/** When splicing a taproot channel, the sender's random signing nonce for the previous funding output. */
79+
case class FundingInputNonce(nonce: IndividualNonce) extends TxCompleteTlv
80+
81+
object FundingInputNonce {
82+
val codec: Codec[FundingInputNonce] = tlvField(publicNonce.as[FundingInputNonce])
7783
}
7884

7985
val txCompleteTlvCodec: Codec[TlvStream[TxCompleteTlv]] = tlvStream(discriminated[TxCompleteTlv].by(varint)
80-
.typecase(UInt64(4), Nonces.codec)
86+
.typecase(UInt64(4), CommitNonces.codec)
87+
.typecase(UInt64(6), FundingInputNonce.codec)
8188
)
8289
}
8390

eclair-core/src/main/scala/fr/acinq/eclair/wire/protocol/LightningMessageTypes.scala

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,12 +119,18 @@ case class TxRemoveOutput(channelId: ByteVector32,
119119

120120
case class TxComplete(channelId: ByteVector32,
121121
tlvStream: TlvStream[TxCompleteTlv] = TlvStream.empty) extends InteractiveTxConstructionMessage with HasChannelId {
122-
val nonces_opt: Option[TxCompleteTlv.Nonces] = tlvStream.get[TxCompleteTlv.Nonces]
122+
val commitNonces_opt: Option[TxCompleteTlv.CommitNonces] = tlvStream.get[TxCompleteTlv.CommitNonces]
123+
val fundingNonce_opt: Option[IndividualNonce] = tlvStream.get[TxCompleteTlv.FundingInputNonce].map(_.nonce)
123124
}
124125

125126
object TxComplete {
126-
def apply(channelId: ByteVector32, commitNonce: IndividualNonce, nextCommitNonce: IndividualNonce, fundingNonce_opt: Option[IndividualNonce]): TxComplete =
127-
TxComplete(channelId, TlvStream(TxCompleteTlv.Nonces(commitNonce, nextCommitNonce, fundingNonce_opt)))
127+
def apply(channelId: ByteVector32, commitNonce: IndividualNonce, nextCommitNonce: IndividualNonce, fundingNonce_opt: Option[IndividualNonce]): TxComplete = {
128+
val tlvs = Set(
129+
Some(TxCompleteTlv.CommitNonces(commitNonce, nextCommitNonce)),
130+
fundingNonce_opt.map(TxCompleteTlv.FundingInputNonce(_)),
131+
).flatten[TxCompleteTlv]
132+
TxComplete(channelId, TlvStream(tlvs))
133+
}
128134
}
129135

130136
case class TxSignatures(channelId: ByteVector32,

eclair-core/src/test/scala/fr/acinq/eclair/channel/InteractiveTxBuilderSpec.scala

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -503,14 +503,14 @@ class InteractiveTxBuilderSpec extends TestKitBaseClass with AnyFunSuiteLike wit
503503
val txCompleteB3 = fwd.forwardBob2Alice[TxComplete]
504504
// Alice --- tx_complete --> Bob
505505
val txCompleteA = fwd.forwardAlice2Bob[TxComplete]
506-
assert(txCompleteA.nonces_opt.nonEmpty)
507-
assert(txCompleteA.nonces_opt.flatMap(_.fundingNonce_opt).isEmpty)
506+
assert(txCompleteA.commitNonces_opt.nonEmpty)
507+
assert(txCompleteA.fundingNonce_opt.isEmpty)
508508
Seq(txCompleteB1, txCompleteB2, txCompleteB3).foreach(txCompleteB => {
509-
assert(txCompleteB.nonces_opt.nonEmpty)
510-
assert(txCompleteB.nonces_opt.flatMap(_.fundingNonce_opt).isEmpty)
509+
assert(txCompleteB.commitNonces_opt.nonEmpty)
510+
assert(txCompleteB.fundingNonce_opt.isEmpty)
511511
})
512512
// Nonces change every time the shared transaction changes.
513-
assert(Seq(txCompleteB1, txCompleteB2, txCompleteB3).flatMap(_.nonces_opt).flatMap(n => Seq(n.commitNonce, n.nextCommitNonce)).toSet.size == 6)
513+
assert(Seq(txCompleteB1, txCompleteB2, txCompleteB3).flatMap(_.commitNonces_opt).flatMap(n => Seq(n.commitNonce, n.nextCommitNonce)).toSet.size == 6)
514514

515515
// Alice is responsible for adding the shared output.
516516
assert(aliceParams.fundingAmount == fundingA)
@@ -523,8 +523,8 @@ class InteractiveTxBuilderSpec extends TestKitBaseClass with AnyFunSuiteLike wit
523523
val successB = bob2alice.expectMsgType[Succeeded]
524524
assert(successB.commitSig.sigOrPartialSig.isInstanceOf[PartialSignatureWithNonce])
525525
val (txA, _, txB, _) = fixtureParams.exchangeSigsBobFirst(bobParams, successA, successB)
526-
assert(successA.nextRemoteCommitNonce_opt.contains((txA.txId, txCompleteB3.nonces_opt.get.nextCommitNonce)))
527-
assert(successB.nextRemoteCommitNonce_opt.contains((txB.txId, txCompleteA.nonces_opt.get.nextCommitNonce)))
526+
assert(successA.nextRemoteCommitNonce_opt.contains((txA.txId, txCompleteB3.commitNonces_opt.get.nextCommitNonce)))
527+
assert(successB.nextRemoteCommitNonce_opt.contains((txB.txId, txCompleteA.commitNonces_opt.get.nextCommitNonce)))
528528
// The resulting transaction is valid and has the right feerate.
529529
assert(txA.txId == txB.txId)
530530
assert(txA.signedTx.lockTime == aliceParams.lockTime)
@@ -1175,9 +1175,9 @@ class InteractiveTxBuilderSpec extends TestKitBaseClass with AnyFunSuiteLike wit
11751175
// Alice --- tx_complete --> Bob
11761176
val txCompleteA = fwdSplice.forwardAlice2Bob[TxComplete]
11771177
Seq(txCompleteA, txCompleteB).foreach(txComplete => {
1178-
assert(txComplete.nonces_opt.nonEmpty)
1179-
assert(txComplete.nonces_opt.flatMap(_.fundingNonce_opt).isEmpty) // the previous commitment didn't use taproot
1180-
assert(txComplete.nonces_opt.map(n => Seq(n.commitNonce, n.nextCommitNonce)).get.size == 2)
1178+
assert(txComplete.commitNonces_opt.nonEmpty)
1179+
assert(txComplete.fundingNonce_opt.isEmpty) // the previous commitment didn't use taproot
1180+
assert(txComplete.commitNonces_opt.map(n => Seq(n.commitNonce, n.nextCommitNonce)).get.size == 2)
11811181
})
11821182

11831183
val successA2 = alice2bob.expectMsgType[Succeeded]
@@ -1189,8 +1189,8 @@ class InteractiveTxBuilderSpec extends TestKitBaseClass with AnyFunSuiteLike wit
11891189
assert(successB2.signingSession.fundingTx.localSigs.previousFundingTxPartialSig_opt.isEmpty)
11901190
assert(successB2.commitSig.sigOrPartialSig.isInstanceOf[PartialSignatureWithNonce])
11911191
val (spliceTxA, commitmentA2, spliceTxB, commitmentB2) = fixtureParams.exchangeSigsBobFirst(spliceFixtureParams.fundingParamsB, successA2, successB2)
1192-
assert(successA2.nextRemoteCommitNonce_opt.contains((spliceTxA.txId, txCompleteB.nonces_opt.get.nextCommitNonce)))
1193-
assert(successB2.nextRemoteCommitNonce_opt.contains((spliceTxB.txId, txCompleteA.nonces_opt.get.nextCommitNonce)))
1192+
assert(successA2.nextRemoteCommitNonce_opt.contains((spliceTxA.txId, txCompleteB.commitNonces_opt.get.nextCommitNonce)))
1193+
assert(successB2.nextRemoteCommitNonce_opt.contains((spliceTxB.txId, txCompleteA.commitNonces_opt.get.nextCommitNonce)))
11941194
assert(spliceTxA.tx.localAmountIn > spliceTxA.tx.remoteAmountIn)
11951195
assert(spliceTxA.signedTx.txIn.exists(_.outPoint == commitmentA1.fundingInput))
11961196
assert(0.msat < spliceTxA.tx.localFees)
@@ -2920,13 +2920,13 @@ class InteractiveTxBuilderSpec extends TestKitBaseClass with AnyFunSuiteLike wit
29202920
// Alice --- tx_add_output --> Bob
29212921
bob ! ReceiveMessage(alice2bob.expectMsgType[SendMessage].msg.asInstanceOf[TxAddOutput])
29222922
val txCompleteBob = bob2alice.expectMsgType[SendMessage].msg.asInstanceOf[TxComplete]
2923-
assert(txCompleteBob.nonces_opt.nonEmpty)
2923+
assert(txCompleteBob.commitNonces_opt.nonEmpty)
29242924
alice ! ReceiveMessage(txCompleteBob)
29252925
// Alice --- tx_complete --> Bob
29262926
bob ! ReceiveMessage(alice2bob.expectMsgType[SendMessage].msg.asInstanceOf[TxComplete])
29272927
// Alice <-- commit_sig --- Bob
29282928
val successA1 = alice2bob.expectMsgType[Succeeded]
2929-
val invalidCommitSig = CommitSig(params.channelId, PartialSignatureWithNonce(randomBytes32(), txCompleteBob.nonces_opt.get.commitNonce), Nil, batchSize = 1)
2929+
val invalidCommitSig = CommitSig(params.channelId, PartialSignatureWithNonce(randomBytes32(), txCompleteBob.commitNonces_opt.get.commitNonce), Nil, batchSize = 1)
29302930
val Left(error) = successA1.signingSession.receiveCommitSig(params.channelParamsA, params.channelKeysA, invalidCommitSig, params.nodeParamsA.currentBlockHeight)(akka.event.NoLogging)
29312931
assert(error.isInstanceOf[InvalidCommitmentSignature])
29322932
}

eclair-core/src/test/scala/fr/acinq/eclair/channel/states/b/WaitForDualFundingCreatedStateSpec.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,8 @@ class WaitForDualFundingCreatedStateSpec extends TestKitBaseClass with FixtureAn
124124
alice2bob.expectMsgType[TxAddOutput]
125125
alice2bob.forward(bob)
126126
val txComplete = bob2alice.expectMsgType[TxComplete]
127-
assert(txComplete.nonces_opt.isDefined)
128-
bob2alice.forward(alice, txComplete.copy(tlvStream = txComplete.tlvStream.copy(records = txComplete.tlvStream.records.filterNot(_.isInstanceOf[TxCompleteTlv.Nonces]))))
127+
assert(txComplete.commitNonces_opt.isDefined)
128+
bob2alice.forward(alice, txComplete.copy(tlvStream = txComplete.tlvStream.copy(records = txComplete.tlvStream.records.filterNot(_.isInstanceOf[TxCompleteTlv.CommitNonces]))))
129129
aliceListener.expectMsgType[ChannelAborted]
130130
awaitCond(alice.stateName == CLOSED)
131131
}

eclair-core/src/test/scala/fr/acinq/eclair/channel/states/c/WaitForDualFundingConfirmedStateSpec.scala

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -993,8 +993,8 @@ class WaitForDualFundingConfirmedStateSpec extends TestKitBaseClass with Fixture
993993
assert(channelReestablish.nextCommitNonces.contains(fundingTxId))
994994
assert(channelReestablish.nextCommitNonces.contains(rbfTxId))
995995
})
996-
assert(channelReestablishAlice.nextCommitNonces.get(rbfTxId).contains(txCompleteAlice.nonces_opt.get.nextCommitNonce))
997-
assert(channelReestablishBob.nextCommitNonces.get(rbfTxId).contains(txCompleteBob.nonces_opt.get.nextCommitNonce))
996+
assert(channelReestablishAlice.nextCommitNonces.get(rbfTxId).contains(txCompleteAlice.commitNonces_opt.get.nextCommitNonce))
997+
assert(channelReestablishBob.nextCommitNonces.get(rbfTxId).contains(txCompleteBob.commitNonces_opt.get.nextCommitNonce))
998998
}
999999

10001000
// Alice retransmits commit_sig, and they exchange tx_signatures afterwards.
@@ -1054,8 +1054,8 @@ class WaitForDualFundingConfirmedStateSpec extends TestKitBaseClass with Fixture
10541054
assert(channelReestablish.nextCommitNonces.contains(fundingTxId))
10551055
assert(channelReestablish.nextCommitNonces.contains(rbfTxId))
10561056
})
1057-
assert(channelReestablishAlice.nextCommitNonces.get(rbfTxId).contains(txCompleteAlice.nonces_opt.get.nextCommitNonce))
1058-
assert(channelReestablishBob.nextCommitNonces.get(rbfTxId).contains(txCompleteBob.nonces_opt.get.nextCommitNonce))
1057+
assert(channelReestablishAlice.nextCommitNonces.get(rbfTxId).contains(txCompleteAlice.commitNonces_opt.get.nextCommitNonce))
1058+
assert(channelReestablishBob.nextCommitNonces.get(rbfTxId).contains(txCompleteBob.commitNonces_opt.get.nextCommitNonce))
10591059
}
10601060

10611061
// Bob retransmits commit_sig and tx_signatures, then Alice sends her tx_signatures.
@@ -1149,8 +1149,8 @@ class WaitForDualFundingConfirmedStateSpec extends TestKitBaseClass with Fixture
11491149
assert(channelReestablish.nextCommitNonces.contains(fundingTxId))
11501150
assert(channelReestablish.nextCommitNonces.contains(rbfTx.txId))
11511151
})
1152-
assert(channelReestablishAlice.nextCommitNonces.get(rbfTx.txId).contains(txCompleteAlice.nonces_opt.get.nextCommitNonce))
1153-
assert(channelReestablishBob.nextCommitNonces.get(rbfTx.txId).contains(txCompleteBob.nonces_opt.get.nextCommitNonce))
1152+
assert(channelReestablishAlice.nextCommitNonces.get(rbfTx.txId).contains(txCompleteAlice.commitNonces_opt.get.nextCommitNonce))
1153+
assert(channelReestablishBob.nextCommitNonces.get(rbfTx.txId).contains(txCompleteBob.commitNonces_opt.get.nextCommitNonce))
11541154
}
11551155

11561156
// Alice and Bob exchange tx_signatures and complete the RBF attempt.
@@ -1252,8 +1252,8 @@ class WaitForDualFundingConfirmedStateSpec extends TestKitBaseClass with Fixture
12521252
assert(channelReestablish.nextCommitNonces.contains(currentFundingTxId))
12531253
assert(channelReestablish.nextCommitNonces.contains(rbfTxId))
12541254
})
1255-
assert(channelReestablishAlice.nextCommitNonces.get(rbfTxId).contains(txCompleteAlice.nonces_opt.get.nextCommitNonce))
1256-
assert(channelReestablishBob.nextCommitNonces.get(rbfTxId).contains(txCompleteBob.nonces_opt.get.nextCommitNonce))
1255+
assert(channelReestablishAlice.nextCommitNonces.get(rbfTxId).contains(txCompleteAlice.commitNonces_opt.get.nextCommitNonce))
1256+
assert(channelReestablishBob.nextCommitNonces.get(rbfTxId).contains(txCompleteBob.commitNonces_opt.get.nextCommitNonce))
12571257
}
12581258

12591259
// Alice and Bob exchange signatures and complete the RBF attempt.

0 commit comments

Comments
 (0)