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
Whenever one side sends `shutdown`, we restart a signing round from
scratch. To be compatible with future taproot channels, we require
the receiver to also send `shutdown` before moving on to exchanging
`closing_complete` and `closing_sig`. This will give nodes a message
to exchange fresh musig2 nonces before producing signatures.
On reconnection, we also restart a signing session from scratch and
discard pending partial signatures.
casestatus: ClosingNegotiation.WaitingForRemoteShutdown=> status
546
+
casestatus: ClosingNegotiation.SigningTransactions=> status.closingCompleteSent_opt.map(_.closingFeerate) match {
547
+
// If we were waiting for their signature, we will send closing_complete again after exchanging shutdown.
548
+
caseSome(closingFeerate) if status.closingSigReceived_opt.isEmpty =>ClosingNegotiation.WaitingForRemoteShutdown(status.localShutdown, Some(closingFeerate))
549
+
case _ =>ClosingNegotiation.WaitingForRemoteShutdown(status.localShutdown, None)
/** We've sent a new shutdown message: we wait for their shutdown message before sending closing_complete (if [[sendClosingFeerate_opt]] is provided). */
@@ -655,12 +679,13 @@ final case class DATA_NEGOTIATING(commitments: Commitments,
655
679
require(!commitments.params.localParams.paysClosingFees || closingTxProposed.forall(_.nonEmpty), "initiator must have at least one closing signature for every negotiation attempt because it initiates the closing")
Copy file name to clipboardExpand all lines: eclair-core/src/main/scala/fr/acinq/eclair/channel/ChannelExceptions.scala
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -118,6 +118,7 @@ case class InvalidHtlcSignature (override val channelId: Byte
118
118
caseclassCannotGenerateClosingTx (overridevalchannelId:ByteVector32) extendsChannelException(channelId, "failed to generate closing transaction: all outputs are trimmed")
119
119
caseclassMissingCloseSignature (overridevalchannelId:ByteVector32) extendsChannelException(channelId, "closing_complete is missing a signature for a closing transaction including our output")
120
120
caseclassInvalidCloseSignature (overridevalchannelId:ByteVector32, txId: TxId) extendsChannelException(channelId, s"invalid close signature: txId=$txId")
121
+
caseclassUnexpectedClosingComplete (overridevalchannelId:ByteVector32, fees: Satoshi, lockTime: Long) extendsChannelException(channelId, s"unexpected closing_complete with fees=$fees and lockTime=$lockTime: we already sent closing_sig, you must send shutdown first")
121
122
caseclassInvalidCloseAmountBelowDust (overridevalchannelId:ByteVector32, txId: TxId) extendsChannelException(channelId, s"invalid closing tx: some outputs are below dust: txId=$txId")
0 commit comments