Skip to content

Commit adf36de

Browse files
authored
Fix yet another flaky test (#1886)
If we want C to go to the closed state, we must ensure it's really his claim transaction that's in the mempool before generating blocks.
1 parent c22596b commit adf36de

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

eclair-core/src/test/scala/fr/acinq/eclair/integration/ChannelIntegrationSpec.scala

+2-1
Original file line numberDiff line numberDiff line change
@@ -733,9 +733,10 @@ class AnchorOutputChannelIntegrationSpec extends ChannelIntegrationSpec {
733733

734734
// bury the unilateral close in a block, C should claim its main output
735735
generateBlocks(2)
736+
val mainOutputC = OutPoint(commitTx, commitTx.txOut.indexWhere(_.publicKeyScript == toRemoteOutC.publicKeyScript))
736737
awaitCond({
737738
bitcoinClient.getMempool().pipeTo(sender.ref)
738-
sender.expectMsgType[Seq[Transaction]].exists(_.txIn.head.outPoint.txid === commitTx.txid)
739+
sender.expectMsgType[Seq[Transaction]].exists(_.txIn.head.outPoint === mainOutputC)
739740
}, max = 20 seconds, interval = 1 second)
740741

741742
// get the claim-remote-output confirmed, then the channel can go to the CLOSED state

0 commit comments

Comments
 (0)