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
554
+
casestatus: ClosingNegotiation.SigningTransactions=> status.closingCompleteSent_opt.map(_.closingFeerate) match {
555
+
// If we were waiting for their signature, we will send closing_complete again after exchanging shutdown.
556
+
caseSome(closingFeerate) if status.closingSigReceived_opt.isEmpty =>ClosingNegotiation.WaitingForRemoteShutdown(status.localShutdown, OnRemoteShutdown.SignTransaction(closingFeerate))
557
+
case _ =>ClosingNegotiation.WaitingForRemoteShutdown(status.localShutdown, OnRemoteShutdown.WaitForSigs)
@@ -655,12 +687,13 @@ final case class DATA_NEGOTIATING(commitments: Commitments,
655
687
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
@@ -119,6 +119,7 @@ case class InvalidHtlcSignature (override val channelId: Byte
119
119
caseclassCannotGenerateClosingTx (overridevalchannelId:ByteVector32) extendsChannelException(channelId, "failed to generate closing transaction: all outputs are trimmed")
120
120
caseclassMissingCloseSignature (overridevalchannelId:ByteVector32) extendsChannelException(channelId, "closing_complete is missing a signature for a closing transaction including our output")
121
121
caseclassInvalidCloseSignature (overridevalchannelId:ByteVector32, txId: TxId) extendsChannelException(channelId, s"invalid close signature: txId=$txId")
122
+
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")
122
123
caseclassInvalidCloseAmountBelowDust (overridevalchannelId:ByteVector32, txId: TxId) extendsChannelException(channelId, s"invalid closing tx: some outputs are below dust: txId=$txId")
0 commit comments