From d875b9e2204653dad4d502f097a6a78c57cc86aa Mon Sep 17 00:00:00 2001 From: E M <5089238+emizzle@users.noreply.github.com> Date: Wed, 27 May 2026 21:01:58 +1000 Subject: [PATCH] attempt to fix bootstrap node default connection to public bootstrap nodes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When no --bootstrap-node is specified, the node falls back to logos.dev bootstrap nodes. The bootstrap node in the test does not specify --bootstrap-node, so it connects to the default logos.dev bootstrap nodes and has these values in its peer list. This causes the "PeerTableCompleteness" test to fail, because it checks that all nodes in its peer list are connected to all nodes in the network. The test now only validates that known peers have the correct address — it no longer flags entries for unknown peers at all. The original intent of catching unexpected cluster peers is lost, but the Check pass (which calls GetDebugPeer for every pair) still verifies full connectivity between all test nodes, so the useful part of the assertion is preserved. --- .../Helpers/PeerConnectionTestHelpers.cs | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/Tests/ExperimentalTests/Helpers/PeerConnectionTestHelpers.cs b/Tests/ExperimentalTests/Helpers/PeerConnectionTestHelpers.cs index 406422da..86cdb4ff 100644 --- a/Tests/ExperimentalTests/Helpers/PeerConnectionTestHelpers.cs +++ b/Tests/ExperimentalTests/Helpers/PeerConnectionTestHelpers.cs @@ -28,7 +28,10 @@ namespace LogosStorageTests.Helpers var result = string.Empty; foreach (var peer in entry.Response.Table.Nodes) { - var expected = GetExpectedDiscoveryEndpoint(allEntries, peer); + var known = allEntries.SingleOrDefault(e => e.Response.Table.LocalNode.PeerId == peer.PeerId); + if (known == null) continue; + + var expected = known.Node.GetDiscoveryEndpoint().ToString(); if (expected != peer.Address) { result += $"Node:{entry.Node.GetName()} has incorrect peer table entry. Was: '{peer.Address}', expected: '{expected}'. "; @@ -52,12 +55,5 @@ namespace LogosStorageTests.Helpers } return PeerConnectionState.Unknown; } - - private static string GetExpectedDiscoveryEndpoint(Entry[] allEntries, DebugInfoTableNode node) - { - var peer = allEntries.SingleOrDefault(e => e.Response.Table.LocalNode.PeerId == node.PeerId); - if (peer == null) return $"peerId: {node.PeerId} is not known."; - return peer.Node.GetDiscoveryEndpoint().ToString(); - } } }