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
Copy file name to clipboardExpand all lines: eclair-core/src/main/scala/fr/acinq/eclair/channel/ChannelData.scala
+2Lines changed: 2 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -73,6 +73,7 @@ case object WAIT_FOR_DUAL_FUNDING_READY extends ChannelState
73
73
caseobjectNORMALextendsChannelState
74
74
caseobjectSHUTDOWNextendsChannelState
75
75
caseobjectNEGOTIATINGextendsChannelState
76
+
caseobjectNEGOTIATING_SIMPLEextendsChannelState
76
77
caseobjectCLOSINGextendsChannelState
77
78
caseobjectCLOSEDextendsChannelState
78
79
caseobjectOFFLINEextendsChannelState
@@ -602,6 +603,7 @@ final case class DATA_NEGOTIATING(commitments: Commitments,
602
603
require(closingTxProposed.nonEmpty, "there must always be a list for the current negotiation")
603
604
require(!commitments.params.localParams.isInitiator || closingTxProposed.forall(_.nonEmpty), "initiator must have at least one closing signature for every negotiation attempt because it initiates the closing")
caseclassCannotGenerateClosingTx (overridevalchannelId:ByteVector32) extendsChannelException(channelId, "failed to generate closing transaction: all outputs are trimmed")
111
+
caseclassMissingCloseSignature (overridevalchannelId:ByteVector32) extendsChannelException(channelId, "closing_complete is missing a signature for a closing transaction including our output")
110
112
caseclassInvalidCloseSignature (overridevalchannelId:ByteVector32, txId: ByteVector32) extendsChannelException(channelId, s"invalid close signature: txId=$txId")
111
113
caseclassInvalidCloseAmountBelowDust (overridevalchannelId:ByteVector32, txId: ByteVector32) extendsChannelException(channelId, s"invalid closing tx: some outputs are below dust: txId=$txId")
// If our output isn't dust, they must provide a signature for a transaction that includes it.
718
+
// Note that we're the closee, so we look for signatures including the closee output.
719
+
(closingTxs.localAndRemote_opt, closingTxs.localOnly_opt) match {
720
+
case (Some(_), Some(_)) if closingComplete.closerAndCloseeSig_opt.isEmpty && closingComplete.noCloserCloseeSig_opt.isEmpty =>returnLeft(MissingCloseSignature(commitment.channelId))
721
+
case (Some(_), None) if closingComplete.closerAndCloseeSig_opt.isEmpty =>returnLeft(MissingCloseSignature(commitment.channelId))
722
+
case (None, Some(_)) if closingComplete.noCloserCloseeSig_opt.isEmpty =>returnLeft(MissingCloseSignature(commitment.channelId))
723
+
case _ => ()
724
+
}
725
+
// We choose the closing signature that matches our preferred closing transaction.
0 commit comments