What changed, and why it matters
This commit fixes a flaky automated test in the Eclair Lightning node software. It adds a wait step so that test nodes have time to learn about network channels before the test proceeds. There is no security issue here—only a test reliability improvement.
No security action needed. This is a test-only change improving CI reliability.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The change is in MessageIntegrationSpec.scala, an integration test file. It adds an awaitCond block that waits until node B’s router knows about 9 channels before continuing. This prevents a race condition where a node announcement might be pruned too early during a later channel-close step, causing intermittent test failures. The production code in Validation.scala is not modified.
Changed components
eclair-core/src/test/scala/fr/acinq/eclair/integration/MessageIntegrationSpec.scalaInspect captured patch +8 / −1
diff --git a/eclair-core/src/test/scala/fr/acinq/eclair/integration/MessageIntegrationSpec.scala b/eclair-core/src/test/scala/fr/acinq/eclair/integration/MessageIntegrationSpec.scala
index 21dfc1d..2b2a455 100644
--- a/eclair-core/src/test/scala/fr/acinq/eclair/integration/MessageIntegrationSpec.scala
+++ b/eclair-core/src/test/scala/fr/acinq/eclair/integration/MessageIntegrationSpec.scala
@@ -35,7 +35,7 @@ import fr.acinq.eclair.message.OnionMessages.{IntermediateNode, Recipient, build
import fr.acinq.eclair.router.Router
import fr.acinq.eclair.wire.protocol.OnionMessagePayloadTlv.ReplyPath
import fr.acinq.eclair.wire.protocol.TlvCodecs.genericTlv
-import fr.acinq.eclair.wire.protocol.{GenericTlv, NodeAnnouncement}
+import fr.acinq.eclair.wire.protocol.{ChannelAnnouncement, GenericTlv, NodeAnnouncement}
import fr.acinq.eclair.{EclairImpl, EncodedNodeId, Features, MilliSatoshiLong, SendOnionMessageResponse, UInt64, randomBytes, randomKey}
import scodec.bits.{ByteVector, HexStringSyntax}
@@ -283,6 +283,13 @@ class MessageIntegrationSpec extends IntegrationSpec {
probe.send(nodes("A").router, Router.GetNodes)
probe.expectMsgType[Iterable[NodeAnnouncement]].size == 6
}, max = 60 seconds, interval = 1 second)
+
+ // We also wait for B to know about all channels, so that when we later close
+ // B's channels, the Router won't prune nodes that still have other channels.
+ awaitCond({
+ probe.send(nodes("B").router, Router.GetChannels)
+ probe.expectMsgType[Iterable[ChannelAnnouncement]].size == 9
+ }, max = 60 seconds, interval = 1 second)
}
test("relay with channels-only") {
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.