Skip to content

Commit 426f55a

Browse files
committed
fixup! Remove spurious interactive-tx commit_sig retransmission
1 parent 9625a6e commit 426f55a

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

eclair-core/src/main/scala/fr/acinq/eclair/channel/fsm/Channel.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2242,7 +2242,7 @@ class Channel(val nodeParams: NodeParams, val wallet: OnChainChannelFunder with
22422242
val nextFundingTlv: Set[ChannelReestablishTlv] = Set(ChannelReestablishTlv.NextFundingTlv(d.signingSession.fundingTx.txId))
22432243
val channelReestablish = ChannelReestablish(
22442244
channelId = d.channelId,
2245-
nextLocalCommitmentNumber = d.signingSession.reconnectNextLocalCommitmentNumber,
2245+
nextLocalCommitmentNumber = d.signingSession.nextLocalCommitmentNumber,
22462246
nextRemoteRevocationNumber = 0,
22472247
yourLastPerCommitmentSecret = PrivateKey(ByteVector32.Zeroes),
22482248
myCurrentPerCommitmentPoint = myFirstPerCommitmentPoint,
@@ -2260,11 +2260,11 @@ class Channel(val nodeParams: NodeParams, val wallet: OnChainChannelFunder with
22602260
// If we disconnected while signing a funding transaction, we may need our peer to retransmit their commit_sig.
22612261
val nextLocalCommitmentNumber = d match {
22622262
case d: DATA_WAIT_FOR_DUAL_FUNDING_CONFIRMED => d.status match {
2263-
case DualFundingStatus.RbfWaitingForSigs(status) => status.reconnectNextLocalCommitmentNumber
2263+
case DualFundingStatus.RbfWaitingForSigs(status) => status.nextLocalCommitmentNumber
22642264
case _ => d.commitments.localCommitIndex + 1
22652265
}
22662266
case d: DATA_NORMAL => d.spliceStatus match {
2267-
case SpliceStatus.SpliceWaitingForSigs(status) => status.reconnectNextLocalCommitmentNumber
2267+
case SpliceStatus.SpliceWaitingForSigs(status) => status.nextLocalCommitmentNumber
22682268
case _ => d.commitments.localCommitIndex + 1
22692269
}
22702270
case _ => d.commitments.localCommitIndex + 1

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1083,8 +1083,8 @@ object InteractiveTxSigningSession {
10831083
val commitInput: InputInfo = localCommit.fold(_.commitTx.input, _.commitTxAndRemoteSig.commitTx.input)
10841084
val localCommitIndex: Long = localCommit.fold(_.index, _.index)
10851085
// This value tells our peer whether we need them to retransmit their commit_sig on reconnection or not.
1086-
val reconnectNextLocalCommitmentNumber: Long = localCommit match {
1087-
case Left(commit) => commit.index
1086+
val nextLocalCommitmentNumber: Long = localCommit match {
1087+
case Left(unsignedCommit) => unsignedCommit.index
10881088
case Right(commit) => commit.index + 1
10891089
}
10901090

0 commit comments

Comments
 (0)