attempt to fix bootstrap node default connection to public bootstrap nodes

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.
This commit is contained in:
E M 2026-05-27 21:01:58 +10:00
parent 46adc41c90
commit d875b9e220
No known key found for this signature in database

View File

@ -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();
}
}
}