Skip to content

Commit 6b09095

Browse files
committed
Rename ClaimRemoteDelayedOutputTx
It isn't delayed anymore for v3 transactions. We could use static wallet public key, but in most cases it wouldn't work and adds extra complexity so we don't do it. We add a comment in the documentation of this class to explain why we're always making a 2nd-stage transaction.
1 parent 57ce47c commit 6b09095

File tree

12 files changed

+79
-64
lines changed

12 files changed

+79
-64
lines changed

eclair-core/src/main/scala/fr/acinq/eclair/channel/Helpers.scala

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1170,7 +1170,7 @@ object Helpers {
11701170
object RemoteClose {
11711171

11721172
/** Transactions spending outputs of a remote commitment transaction. */
1173-
case class SecondStageTransactions(mainTx_opt: Option[ClaimRemoteDelayedOutputTx], anchorTx_opt: Option[ClaimRemoteAnchorTx], htlcTxs: Seq[ClaimHtlcTx])
1173+
case class SecondStageTransactions(mainTx_opt: Option[ClaimRemoteMainOutputTx], anchorTx_opt: Option[ClaimRemoteAnchorTx], htlcTxs: Seq[ClaimHtlcTx])
11741174

11751175
/** Claim all the outputs that belong to us in the remote commitment transaction (which can be either their current or next commitment). */
11761176
def claimCommitTxOutputs(channelKeys: ChannelKeys, commitment: FullCommitment, remoteCommit: RemoteCommit, commitTx: Transaction, closingFeerate: FeeratePerKw, finalScriptPubKey: ByteVector, spendAnchorWithoutHtlcs: Boolean)(implicit log: LoggingAdapter): (RemoteCommitPublished, SecondStageTransactions) = {
@@ -1207,10 +1207,10 @@ object Helpers {
12071207
}
12081208

12091209
/** Claim our main output from the remote commitment transaction, if available. */
1210-
def claimMainOutput(commitKeys: RemoteCommitmentKeys, commitTx: Transaction, dustLimit: Satoshi, commitmentFormat: CommitmentFormat, feerate: FeeratePerKw, finalScriptPubKey: ByteVector)(implicit log: LoggingAdapter): Option[ClaimRemoteDelayedOutputTx] = {
1210+
def claimMainOutput(commitKeys: RemoteCommitmentKeys, commitTx: Transaction, dustLimit: Satoshi, commitmentFormat: CommitmentFormat, feerate: FeeratePerKw, finalScriptPubKey: ByteVector)(implicit log: LoggingAdapter): Option[ClaimRemoteMainOutputTx] = {
12111211
commitmentFormat match {
1212-
case _: AnchorOutputsCommitmentFormat | _: SimpleTaprootChannelCommitmentFormat | ZeroFeeCommitmentFormat => withTxGenerationLog("remote-main-delayed") {
1213-
ClaimRemoteDelayedOutputTx.createUnsignedTx(commitKeys, commitTx, dustLimit, finalScriptPubKey, feerate, commitmentFormat)
1212+
case _: AnchorOutputsCommitmentFormat | _: SimpleTaprootChannelCommitmentFormat | ZeroFeeCommitmentFormat => withTxGenerationLog("remote-main") {
1213+
ClaimRemoteMainOutputTx.createUnsignedTx(commitKeys, commitTx, dustLimit, finalScriptPubKey, feerate, commitmentFormat)
12141214
}
12151215
}
12161216
}
@@ -1329,7 +1329,7 @@ object Helpers {
13291329
object RevokedClose {
13301330

13311331
/** Transactions spending outputs of a revoked remote commitment transactions. */
1332-
case class SecondStageTransactions(mainTx_opt: Option[ClaimRemoteDelayedOutputTx], mainPenaltyTx_opt: Option[MainPenaltyTx], htlcPenaltyTxs: Seq[HtlcPenaltyTx])
1332+
case class SecondStageTransactions(mainTx_opt: Option[ClaimRemoteMainOutputTx], mainPenaltyTx_opt: Option[MainPenaltyTx], htlcPenaltyTxs: Seq[HtlcPenaltyTx])
13331333

13341334
/** Transactions spending outputs of confirmed remote HTLC transactions. */
13351335
case class ThirdStageTransactions(htlcDelayedPenaltyTxs: Seq[ClaimHtlcDelayedOutputPenaltyTx])
@@ -1377,8 +1377,8 @@ object Helpers {
13771377

13781378
// First we will claim our main output right away.
13791379
val mainTx_opt = commitmentFormat match {
1380-
case _: AnchorOutputsCommitmentFormat | _: SimpleTaprootChannelCommitmentFormat | ZeroFeeCommitmentFormat => withTxGenerationLog("remote-main-delayed") {
1381-
ClaimRemoteDelayedOutputTx.createUnsignedTx(commitKeys, commitTx, dustLimit, finalScriptPubKey, feerateMain, commitmentFormat)
1380+
case _: AnchorOutputsCommitmentFormat | _: SimpleTaprootChannelCommitmentFormat | ZeroFeeCommitmentFormat => withTxGenerationLog("remote-main") {
1381+
ClaimRemoteMainOutputTx.createUnsignedTx(commitKeys, commitTx, dustLimit, finalScriptPubKey, feerateMain, commitmentFormat)
13821382
}
13831383
}
13841384

eclair-core/src/main/scala/fr/acinq/eclair/transactions/Transactions.scala

Lines changed: 25 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ object Transactions {
8181
def claimHtlcTimeoutWeight: Int
8282
/** Weight of a fully signed [[ClaimLocalDelayedOutputTx]] transaction. */
8383
def toLocalDelayedWeight: Int
84-
/** Weight of a fully signed [[ClaimRemoteDelayedOutputTx]] transaction. */
84+
/** Weight of a fully signed [[ClaimRemoteMainOutputTx]] transaction. */
8585
def toRemoteWeight: Int
8686
/** Weight of a fully signed [[HtlcDelayedTx]] 3rd-stage transaction (spending the output of an [[HtlcTx]]). */
8787
def htlcDelayedWeight: Int
@@ -502,13 +502,13 @@ object Transactions {
502502
* Transactions spending a remote [[CommitTx]] or one of its descendants.
503503
*
504504
* When a current remote [[CommitTx]] is published:
505-
* - When using anchor outputs, [[ClaimRemoteDelayedOutputTx]] spends the to-local output of [[CommitTx]]
505+
* - When using anchor outputs, [[ClaimRemoteMainOutputTx]] spends the to-local output of [[CommitTx]]
506506
* - When using anchor outputs, [[ClaimRemoteAnchorTx]] spends the to-local anchor of [[CommitTx]]
507507
* - [[ClaimHtlcSuccessTx]] spends received htlc outputs of [[CommitTx]] for which we have the preimage
508508
* - [[ClaimHtlcTimeoutTx]] spends sent htlc outputs of [[CommitTx]] after a timeout
509509
*
510510
* When a revoked remote [[CommitTx]] is published:
511-
* - When using anchor outputs, [[ClaimRemoteDelayedOutputTx]] spends the to-local output of [[CommitTx]]
511+
* - When using anchor outputs, [[ClaimRemoteMainOutputTx]] spends the to-local output of [[CommitTx]]
512512
* - [[MainPenaltyTx]] spends the remote main output using the revocation secret
513513
* - [[HtlcPenaltyTx]] spends all htlc outputs using the revocation secret (and competes with [[HtlcSuccessTx]] and [[HtlcTimeoutTx]] published by the remote node)
514514
* - [[ClaimHtlcDelayedOutputPenaltyTx]] spends [[HtlcSuccessTx]] transactions published by the remote node using the revocation secret
@@ -984,9 +984,24 @@ object Transactions {
984984
}
985985
}
986986

987-
/** This transaction spends our main balance from the remote commitment with a 1-block relative delay, or immediately when using v3 commitments. */
988-
case class ClaimRemoteDelayedOutputTx(commitKeys: RemoteCommitmentKeys, input: InputInfo, tx: Transaction, commitmentFormat: CommitmentFormat) extends RemoteCommitForceCloseTransaction {
989-
override val desc: String = "remote-main-delayed"
987+
/**
988+
* This transaction spends our main balance from the remote commitment.
989+
*
990+
* When using [[AnchorOutputsCommitmentFormat]] or [[SimpleTaprootChannelCommitmentFormat]], there is a CSV-1 on the
991+
* output to allow CPFP carve-out on the anchor outputs.
992+
*
993+
* Otherwise, it directly sends to a public key (p2wpkh or p2tr). In theory we could avoid making a 2nd-stage transaction
994+
* (and directly use a public key from our bitcoin wallet), but it adds complexity and doesn't work in the case where
995+
* we upgrade an anchor outputs channel to v3 during a splice (since the public key was generated when the channel was
996+
* opened and cannot be changed afterwards). Another reason to use a 2nd-stage transaction is because that's how we
997+
* pay the on-chain fees for the commitment transaction (which doesn't pay any fees) by also spending the P2A output
998+
* (which avoids the need for external wallet inputs).
999+
* The only case where it is wasteful to have this 2nd-stage transaction is if the remote peer paid the fees for the
1000+
* remote commitment and it confirmed: in that case, we haven't paid any on-chain fees yet for the force-close, and
1001+
* our peer has paid for the largest transaction, so it's fine even though it's not optimal.
1002+
*/
1003+
case class ClaimRemoteMainOutputTx(commitKeys: RemoteCommitmentKeys, input: InputInfo, tx: Transaction, commitmentFormat: CommitmentFormat) extends RemoteCommitForceCloseTransaction {
1004+
override val desc: String = "remote-main"
9901005
override val expectedWeight: Int = commitmentFormat.toRemoteWeight
9911006

9921007
override def sign(): Transaction = {
@@ -1009,8 +1024,8 @@ object Transactions {
10091024
}
10101025
}
10111026

1012-
object ClaimRemoteDelayedOutputTx {
1013-
def createUnsignedTx(commitKeys: RemoteCommitmentKeys, commitTx: Transaction, localDustLimit: Satoshi, localFinalScriptPubKey: ByteVector, feerate: FeeratePerKw, commitmentFormat: CommitmentFormat): Either[TxGenerationSkipped, ClaimRemoteDelayedOutputTx] = {
1027+
object ClaimRemoteMainOutputTx {
1028+
def createUnsignedTx(commitKeys: RemoteCommitmentKeys, commitTx: Transaction, localDustLimit: Satoshi, localFinalScriptPubKey: ByteVector, feerate: FeeratePerKw, commitmentFormat: CommitmentFormat): Either[TxGenerationSkipped, ClaimRemoteMainOutputTx] = {
10141029
val redeemInfo = commitmentFormat match {
10151030
case _: AnchorOutputsCommitmentFormat =>
10161031
val redeemScript = Script.write(toRemoteDelayed(commitKeys.publicKeys))
@@ -1034,7 +1049,7 @@ object Transactions {
10341049
txOut = TxOut(amount, localFinalScriptPubKey) :: Nil,
10351050
lockTime = 0
10361051
)
1037-
val unsignedTx = ClaimRemoteDelayedOutputTx(commitKeys, input, tx, commitmentFormat)
1052+
val unsignedTx = ClaimRemoteMainOutputTx(commitKeys, input, tx, commitmentFormat)
10381053
skipTxIfBelowDust(unsignedTx, localDustLimit)
10391054
}
10401055
}
@@ -1638,7 +1653,7 @@ object Transactions {
16381653
val updatedTx = txInfo.tx.copy(txOut = txInfo.tx.txOut.headOption.map(_.copy(amount = txInfo.amountIn - fee)).toSeq)
16391654
txInfo match {
16401655
case txInfo: ClaimLocalDelayedOutputTx => Right(txInfo.copy(tx = updatedTx))
1641-
case txInfo: ClaimRemoteDelayedOutputTx => Right(txInfo.copy(tx = updatedTx))
1656+
case txInfo: ClaimRemoteMainOutputTx => Right(txInfo.copy(tx = updatedTx))
16421657
// Anchor transaction don't have any output: wallet inputs must be used to pay fees.
16431658
case txInfo: ClaimAnchorTx => Left(CannotUpdateFee(txInfo))
16441659
// HTLC transactions are pre-signed, we can't update their fee by lowering the output amount.

eclair-core/src/test/scala/fr/acinq/eclair/balance/CheckBalanceSpec.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ class CheckBalanceSpec extends TestKitBaseClass with FixtureAnyFunSuiteLike with
128128
alice ! WatchFundingSpentTriggered(bobCommitTx)
129129
// In response to that, alice publishes her claim txs.
130130
alice2blockchain.expectReplaceableTxPublished[ClaimRemoteAnchorTx]
131-
val claimMain = alice2blockchain.expectFinalTxPublished("remote-main-delayed")
131+
val claimMain = alice2blockchain.expectFinalTxPublished("remote-main")
132132
val mainAmount = bobCommitTx.txOut(claimMain.input.index.toInt).amount
133133
val claimHtlcTxs = (1 to 3).map(_ => alice2blockchain.expectMsgType[PublishReplaceableTx].txInfo)
134134
assert(claimHtlcTxs.collect { case tx: ClaimHtlcSuccessTx => tx }.size == 1)
@@ -185,7 +185,7 @@ class CheckBalanceSpec extends TestKitBaseClass with FixtureAnyFunSuiteLike with
185185
alice ! WatchFundingSpentTriggered(bobCommitTx)
186186
// In response to that, alice publishes her claim txs
187187
alice2blockchain.expectReplaceableTxPublished[ClaimRemoteAnchorTx]
188-
val claimMain = alice2blockchain.expectFinalTxPublished("remote-main-delayed")
188+
val claimMain = alice2blockchain.expectFinalTxPublished("remote-main")
189189
val mainAmount = bobCommitTx.txOut(claimMain.input.index.toInt).amount
190190
(1 to 2).map(_ => alice2blockchain.expectReplaceableTxPublished[ClaimHtlcTimeoutTx])
191191
alice ! WatchTxConfirmedTriggered(BlockHeight(600_000), 5, bobCommitTx)

eclair-core/src/test/scala/fr/acinq/eclair/channel/HelpersSpec.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ class HelpersSpec extends TestKitBaseClass with AnyFunSuiteLike with ChannelStat
114114

115115
val rcp = bob.stateData.asInstanceOf[DATA_CLOSING].remoteCommitPublished.get
116116
rcp.anchorOutput_opt.foreach(_ => bob2blockchain.expectReplaceableTxPublished[ClaimRemoteAnchorTx])
117-
rcp.localOutput_opt.foreach(_ => bob2blockchain.expectFinalTxPublished("remote-main-delayed"))
117+
rcp.localOutput_opt.foreach(_ => bob2blockchain.expectFinalTxPublished("remote-main"))
118118
// Bob is missing the preimage for 2 of the HTLCs she received.
119119
assert(rcp.htlcOutputs.size == 6)
120120
val claimHtlcTxs = (0 until 4).map(_ => bob2blockchain.expectMsgType[PublishReplaceableTx])

eclair-core/src/test/scala/fr/acinq/eclair/channel/publish/ReplaceableTxPublisherSpec.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1603,7 +1603,7 @@ class ReplaceableTxPublisherSpec extends TestKitBaseClass with AnyFunSuiteLike w
16031603
generateBlocks(1)
16041604

16051605
val anchorTx = alice2blockchain.expectReplaceableTxPublished[ClaimRemoteAnchorTx]
1606-
val mainTx = alice2blockchain.expectFinalTxPublished("remote-main-delayed")
1606+
val mainTx = alice2blockchain.expectFinalTxPublished("remote-main")
16071607
val claimHtlcSuccess = alice2blockchain.expectMsgType[PublishReplaceableTx].copy(confirmationTarget = ConfirmationTarget.Absolute(overrideHtlcTarget))
16081608
assert(claimHtlcSuccess.txInfo.isInstanceOf[ClaimHtlcSuccessTx])
16091609
val claimHtlcTimeout = alice2blockchain.expectMsgType[PublishReplaceableTx].copy(confirmationTarget = ConfirmationTarget.Absolute(overrideHtlcTarget))

eclair-core/src/test/scala/fr/acinq/eclair/channel/states/ChannelStateTestsHelperMethods.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -717,7 +717,7 @@ trait ChannelStateTestsBase extends Assertions with Eventually {
717717
// If anchor outputs is used, we use the anchor output to bump the fees if necessary.
718718
val publishedAnchorTx = s2blockchain.expectReplaceableTxPublished[ClaimRemoteAnchorTx].tx
719719
// if s has a main output in the commit tx (when it has a non-dust balance), it should be claimed
720-
val publishedMainTx_opt = remoteCommitPublished.localOutput_opt.map(_ => s2blockchain.expectFinalTxPublished("remote-main-delayed").tx)
720+
val publishedMainTx_opt = remoteCommitPublished.localOutput_opt.map(_ => s2blockchain.expectFinalTxPublished("remote-main").tx)
721721
publishedMainTx_opt.foreach(tx => Transaction.correctlySpends(tx, rCommitTx :: Nil, ScriptFlags.STANDARD_SCRIPT_VERIFY_FLAGS))
722722
// all htlcs success/timeout should be claimed
723723
val publishedClaimHtlcTxs = (0 until htlcSuccessCount + htlcTimeoutCount).map { _ =>

eclair-core/src/test/scala/fr/acinq/eclair/channel/states/c/WaitForDualFundingConfirmedStateSpec.scala

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -774,7 +774,7 @@ class WaitForDualFundingConfirmedStateSpec extends TestKitBaseClass with Fixture
774774
alice ! WatchFundingSpentTriggered(bobCommitTx)
775775
aliceListener.expectMsgType[TransactionPublished]
776776
alice2blockchain.expectReplaceableTxPublished[ClaimRemoteAnchorTx]
777-
val claimMain = alice2blockchain.expectFinalTxPublished("remote-main-delayed")
777+
val claimMain = alice2blockchain.expectFinalTxPublished("remote-main")
778778
Transaction.correctlySpends(claimMain.tx, Seq(bobCommitTx), ScriptFlags.STANDARD_SCRIPT_VERIFY_FLAGS)
779779
alice2blockchain.expectWatchTxConfirmed(bobCommitTx.txid)
780780
alice2blockchain.expectWatchOutputSpent(claimMain.input)
@@ -810,7 +810,7 @@ class WaitForDualFundingConfirmedStateSpec extends TestKitBaseClass with Fixture
810810
alice ! WatchFundingSpentTriggered(bobCommitTx1)
811811
assert(aliceListener.expectMsgType[TransactionPublished].tx.txid == bobCommitTx1.txid)
812812
alice2blockchain.expectReplaceableTxPublished[ClaimRemoteAnchorTx]
813-
val claimMain = alice2blockchain.expectFinalTxPublished("remote-main-delayed")
813+
val claimMain = alice2blockchain.expectFinalTxPublished("remote-main")
814814
Transaction.correctlySpends(claimMain.tx, Seq(bobCommitTx1), ScriptFlags.STANDARD_SCRIPT_VERIFY_FLAGS)
815815
alice2blockchain.expectWatchTxConfirmed(bobCommitTx1.txid)
816816
alice2blockchain.expectWatchOutputSpent(claimMain.input)
@@ -833,7 +833,7 @@ class WaitForDualFundingConfirmedStateSpec extends TestKitBaseClass with Fixture
833833
assert(alice2blockchain.expectMsgType[WatchFundingSpent].txId == fundingTx.txid)
834834
alice2 ! WatchFundingSpentTriggered(bobCommitTx)
835835
alice2blockchain.expectReplaceableTxPublished[ClaimRemoteAnchorTx]
836-
val claimMainAlice = alice2blockchain.expectFinalTxPublished("remote-main-delayed")
836+
val claimMainAlice = alice2blockchain.expectFinalTxPublished("remote-main")
837837
Transaction.correctlySpends(claimMainAlice.tx, Seq(bobCommitTx), ScriptFlags.STANDARD_SCRIPT_VERIFY_FLAGS)
838838
alice2blockchain.expectWatchTxConfirmed(bobCommitTx.txid)
839839
alice2blockchain.expectWatchOutputSpent(claimMainAlice.input)
@@ -844,7 +844,7 @@ class WaitForDualFundingConfirmedStateSpec extends TestKitBaseClass with Fixture
844844
assert(bob2blockchain.expectMsgType[WatchFundingSpent].txId == fundingTx.txid)
845845
bob2 ! WatchFundingSpentTriggered(aliceCommitTx)
846846
bob2blockchain.expectReplaceableTxPublished[ClaimRemoteAnchorTx]
847-
val claimMainBob = bob2blockchain.expectFinalTxPublished("remote-main-delayed")
847+
val claimMainBob = bob2blockchain.expectFinalTxPublished("remote-main")
848848
Transaction.correctlySpends(claimMainBob.tx, Seq(aliceCommitTx), ScriptFlags.STANDARD_SCRIPT_VERIFY_FLAGS)
849849
bob2blockchain.expectWatchTxConfirmed(aliceCommitTx.txid)
850850
bob2blockchain.expectWatchOutputSpent(claimMainBob.input)
@@ -872,7 +872,7 @@ class WaitForDualFundingConfirmedStateSpec extends TestKitBaseClass with Fixture
872872
alice2blockchain.expectMsg(UnwatchTxConfirmed(fundingTx2.txId))
873873
alice2 ! WatchFundingSpentTriggered(bobCommitTx1)
874874
alice2blockchain.expectReplaceableTxPublished[ClaimRemoteAnchorTx]
875-
val claimMainAlice = alice2blockchain.expectFinalTxPublished("remote-main-delayed")
875+
val claimMainAlice = alice2blockchain.expectFinalTxPublished("remote-main")
876876
Transaction.correctlySpends(claimMainAlice.tx, Seq(bobCommitTx1), ScriptFlags.STANDARD_SCRIPT_VERIFY_FLAGS)
877877
alice2blockchain.expectWatchTxConfirmed(bobCommitTx1.txid)
878878
alice2blockchain.expectWatchOutputSpent(claimMainAlice.input)
@@ -885,7 +885,7 @@ class WaitForDualFundingConfirmedStateSpec extends TestKitBaseClass with Fixture
885885
bob2blockchain.expectMsg(UnwatchTxConfirmed(fundingTx2.txId))
886886
bob2 ! WatchFundingSpentTriggered(aliceCommitTx1)
887887
bob2blockchain.expectReplaceableTxPublished[ClaimRemoteAnchorTx]
888-
val claimMainBob = bob2blockchain.expectFinalTxPublished("remote-main-delayed")
888+
val claimMainBob = bob2blockchain.expectFinalTxPublished("remote-main")
889889
Transaction.correctlySpends(claimMainBob.tx, Seq(aliceCommitTx1), ScriptFlags.STANDARD_SCRIPT_VERIFY_FLAGS)
890890
bob2blockchain.expectWatchTxConfirmed(aliceCommitTx1.txid)
891891
bob2blockchain.expectWatchOutputSpent(claimMainBob.input)
@@ -1331,7 +1331,7 @@ class WaitForDualFundingConfirmedStateSpec extends TestKitBaseClass with Fixture
13311331
val bobCommitTx = bob.signCommitTx()
13321332
alice ! WatchFundingSpentTriggered(bobCommitTx)
13331333
val anchorTxRemote = alice2blockchain.expectReplaceableTxPublished[ClaimRemoteAnchorTx]
1334-
val claimMainRemote = alice2blockchain.expectFinalTxPublished("remote-main-delayed")
1334+
val claimMainRemote = alice2blockchain.expectFinalTxPublished("remote-main")
13351335
Transaction.correctlySpends(claimMainRemote.tx, Seq(bobCommitTx), ScriptFlags.STANDARD_SCRIPT_VERIFY_FLAGS)
13361336
alice2blockchain.expectWatchTxConfirmed(bobCommitTx.txid)
13371337
alice2blockchain.expectWatchOutputSpent(claimMainRemote.input)
@@ -1379,7 +1379,7 @@ class WaitForDualFundingConfirmedStateSpec extends TestKitBaseClass with Fixture
13791379
// Bob publishes his commit tx, Alice reacts by spending her remote main output.
13801380
alice ! WatchFundingSpentTriggered(bobCommitTx1)
13811381
val anchorRemote = alice2blockchain.expectReplaceableTxPublished[ClaimRemoteAnchorTx]
1382-
val claimMainRemote = alice2blockchain.expectFinalTxPublished("remote-main-delayed")
1382+
val claimMainRemote = alice2blockchain.expectFinalTxPublished("remote-main")
13831383
Transaction.correctlySpends(claimMainRemote.tx, Seq(bobCommitTx1), ScriptFlags.STANDARD_SCRIPT_VERIFY_FLAGS)
13841384
alice2blockchain.expectWatchTxConfirmed(bobCommitTx1.txid)
13851385
alice2blockchain.expectWatchOutputsSpent(Seq(anchorRemote.input.outPoint, claimMainRemote.input))

0 commit comments

Comments
 (0)