Skip to content

Commit 98b419d

Browse files
committed
Fix watcherAutoPilot WatchExternalChannelSpent
- the spent output should match the whole Outpoint of the funding tx
1 parent abe3779 commit 98b419d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

eclair-core/src/test/scala/fr/acinq/eclair/integration/basic/fixtures/MinimalNodeFixture.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import akka.testkit.{TestActor, TestProbe}
88
import com.softwaremill.quicklens.ModifyPimp
99
import com.typesafe.config.ConfigFactory
1010
import fr.acinq.bitcoin.scalacompat.Crypto.PublicKey
11-
import fr.acinq.bitcoin.scalacompat.{Block, ByteVector32, Satoshi, SatoshiLong, Transaction, TxId}
11+
import fr.acinq.bitcoin.scalacompat.{Block, ByteVector32, OutPoint, Satoshi, SatoshiLong, Transaction, TxId}
1212
import fr.acinq.eclair.ShortChannelId.txIndex
1313
import fr.acinq.eclair.blockchain.SingleKeyOnChainWallet
1414
import fr.acinq.eclair.blockchain.bitcoind.ZmqWatcher
@@ -325,7 +325,7 @@ object MinimalNodeFixture extends Assertions with Eventually with IntegrationPat
325325
}
326326
Behaviors.same
327327
case watch: ZmqWatcher.WatchExternalChannelSpent =>
328-
knownFundingTxs().find(_.txIn.exists(_.outPoint.txid == watch.txId)) match {
328+
knownFundingTxs().find(_.txIn.exists(_.outPoint == OutPoint(watch.txId, watch.outputIndex))) match {
329329
case Some(nextFundingTx) =>
330330
watch.replyTo ! ZmqWatcher.WatchExternalChannelSpentTriggered(watch.shortChannelId, nextFundingTx)
331331
case None => timers.startSingleTimer(watch, 10 millis)

0 commit comments

Comments
 (0)