test: add flag to test_constant_packet_size
What changed, and why it matters
This is a one-line change to a test file. It adds a developer-only flag to an existing test so the test can verify that network packets are padded to a constant size. There is no change to production code, no user-facing behavior change, and no security fix or vulnerability indicated.
No security action required. This is a test-only change and can be treated as routine test maintenance.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The commit modifies tests/test_connection.py, changing node_factory.get_nodes(4) to node_factory.get_nodes(4, opts={‘dev-uniform-padding’: None}). This opts-in to a developer/debug feature (‘dev-uniform-padding’) for the test nodes so that test_constant_packet_size exercises uniform packet padding. The production padding logic itself is not changed; only the test invocation is updated.
Changed components
tests/test_connection.pyInspect captured patch +1 / −1
diff --git a/tests/test_connection.py b/tests/test_connection.py
index dece3e1a..87ee2b66 100644
--- a/tests/test_connection.py
+++ b/tests/test_connection.py
@@ -4818,7 +4818,7 @@ def test_constant_packet_size(node_factory, tcp_capture):
Test that TCP packets between nodes are constant size. This will be skipped unless
you can run `dumpcap` (usually means you have to be in the `wireshark` group).
"""
- l1, l2, l3, l4 = node_factory.get_nodes(4)
+ l1, l2, l3, l4 = node_factory.get_nodes(4, opts={'dev-uniform-padding': None})
# Encrypted setup BOLT 8 has some short packets.
l1.connect(l2)
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.