AI-generated analysisPublished automatically and not human-verified. Validated context appears in community notes below.
← Watch feed
Informational 15 Bitcoin

pytest: fix flake in test_gossip_store_compact_while_extending and test_gossmap_lost_node

Public commit record

What the developer wrote

Authored by Rusty Russell

83/100 · Strong
pytest: fix flake in test_gossip_store_compact_while_extending and test_gossmap_lost_node

node_factory.line_graph waits until all nodes have seen all channels,
not all node announcements, so we can get this:

```
> assert post_nodes == pre_nodes
...
E Full diff:
E [
E {
E + 'addresses': [],
E + 'alias': 'JUNIORYARD-b2d9563',
E + 'color': '02287b',
E + 'features': '808898880a8a59a1',
E + 'last_timestamp': 1771565748,
E 'nodeid': '02287bfac8b99b35477ebe9334eede1e32b189e24644eb701c079614712331cec0',
E },
E {
E 'addresses': [],
E 'alias': 'SILENTGOPHER-b2d9563',
E 'color': '033845',
E 'features': '808898880a8a59a1',
...
tests/test_gossip.py:1710: AssertionError
```

Since the same pattern occurs in test_gossmap_lost_node, fix that too.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
The short version

What changed, and why it matters

This commit fixes two flaky automated tests in the Core Lightning project's test suite. The tests were occasionally failing because they assumed all network node announcements had been received, but the helper function they used only waited for channel announcements. The fix adds an explicit wait for node announcements before capturing the list of nodes. There is no change to production code and no security relevance.

Recommended action

No security action needed. This is a test reliability improvement.

Security signals we found

No strong security signals were identified.

Risk score

Why this scored 15/100

Our methodology →
Potential impact 0/30
Exploitability 0/25
Stealth signal 0/15
Affected reach 0/15
Confidence 10/10
Evidence quality 5/5
Human-validated context

Community notes

Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.

No validated notes yet.

The AI analysis stands alone for now. Submit a note if you can add evidence or important context.