You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We fully implement lightning/bolts#1214 to stop
retransmitting `commit_sig` when our peer has already received it. We
also correctly set `next_commitment_number` to let our peer know whether
we have received their `commit_sig` or not.
We also retransmit `tx_signatures` (and, if requested, `commit_sig`)
after sending `channel_ready` in the 0-conf case. This was missing and
was a bug.
// We've already received their commit_sig and sent our tx_signatures. We retransmit our tx_signatures
2387
+
// and our commit_sig if they haven't received it already.
2388
+
channelReestablish.nextFundingTxId_opt match {
2389
+
caseSome(fundingTxId) if fundingTxId == d.commitments.latest.fundingTxId =>
2390
+
d.commitments.latest.localFundingStatus.localSigs_opt match {
2391
+
caseSome(txSigs) if channelReestablish.nextLocalCommitmentNumber ==0=>
2392
+
log.info("re-sending commit_sig and tx_signatures for fundingTxIndex={} fundingTxId={}", d.commitments.latest.fundingTxIndex, d.commitments.latest.fundingTxId)
Syncing.checkSync(keyManager, d.commitments, channelReestablish) match {
@@ -2412,23 +2448,26 @@ class Channel(val nodeParams: NodeParams, val wallet: OnChainChannelFunder with
2412
2448
caseSome(fundingTxId) =>
2413
2449
d.spliceStatus match {
2414
2450
caseSpliceStatus.SpliceWaitingForSigs(signingSession) if signingSession.fundingTx.txId == fundingTxId =>
2415
-
// We retransmit our commit_sig, and will send our tx_signatures once we've received their commit_sig.
2416
-
log.info("re-sending commit_sig for splice attempt with fundingTxIndex={} fundingTxId={}", signingSession.fundingTxIndex, signingSession.fundingTx.txId)
if (channelReestablish.nextLocalCommitmentNumber == d.commitments.remoteCommitIndex) {
2452
+
// They haven't received our commit_sig: we retransmit it.
2453
+
// We're also waiting for signatures from them, and will send our tx_signatures once we receive them.
2454
+
log.info("re-sending commit_sig for splice attempt with fundingTxIndex={} fundingTxId={}", signingSession.fundingTxIndex, signingSession.fundingTx.txId)
// If we have not received their tx_signatures, we can't tell whether they had received our commit_sig, so we need to retransmit it
2426
-
log.info("re-sending commit_sig and tx_signatures for fundingTxIndex={} fundingTxId={}", d.commitments.latest.fundingTxIndex, d.commitments.latest.fundingTxId)
log.info("re-sending tx_signatures for fundingTxIndex={} fundingTxId={}", d.commitments.latest.fundingTxIndex, d.commitments.latest.fundingTxId)
2431
-
sendQueue = sendQueue :+fundingTx.localSigs
2462
+
// We've already received their commit_sig and sent our tx_signatures. We retransmit our
2463
+
// tx_signatures and our commit_sig if they haven't received it already.
2464
+
if (channelReestablish.nextLocalCommitmentNumber == d.commitments.remoteCommitIndex) {
2465
+
log.info("re-sending commit_sig and tx_signatures for fundingTxIndex={} fundingTxId={}", d.commitments.latest.fundingTxIndex, d.commitments.latest.fundingTxId)
0 commit comments