pytest: speed up channeld_fakenet tests.
What changed, and why it matters
This commit only changes a test helper plugin that simulates network delays during automated testing. It reduces artificial fake delays from 0.1–1 seconds down to 0.01–0.1 seconds so the test suite runs faster. There is no change to production code, no real network behavior is altered, and no security issue is present.
No action required. This is a benign test-optimization change.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The patch modifies tests/plugins/channeld_fakenet.c, a fake channel daemon used in pytest scenarios. It lowers the synthetic millisecond delay range used inside channel_range() calls: the upper bound drops from 900 to 90, and the base offset drops from 100 ms to 10 ms. The result is a purely cosmetic/test-performance tweak with no effect on live Lightning protocol handling, cryptography, state machines, or resource limits.
Changed components
tests/plugins/channeld_fakenet.cInspect captured patch +3 / −3
diff --git a/tests/plugins/channeld_fakenet.c b/tests/plugins/channeld_fakenet.c
index dd1d318c..81002e14 100644
--- a/tests/plugins/channeld_fakenet.c
+++ b/tests/plugins/channeld_fakenet.c
@@ -840,9 +840,9 @@ found_next:
dfwd->path_key = tal_steal(dfwd, next_path_key);
dfwd->expected = next;
- /* Delay 0.1 - 1 seconds, but skewed lower */
- msec_delay = channel_range(info, &scidd, 1, 900);
- msec_delay = 100 + channel_range(info, &scidd, 0, msec_delay);
+ /* Delay 1 - 100 milliseconds, but skewed lower */
+ msec_delay = channel_range(info, &scidd, 1, 90);
+ msec_delay = 10 + channel_range(info, &scidd, 0, msec_delay);
status_debug("Delaying %u msec for %s",
msec_delay, fmt_short_channel_id_dir(tmpctx, &scidd));
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.