pytest: increase test_generate_coinmoves to 2M entries.
What changed, and why it matters
This commit only changes a test file. It increases the number of entries in a performance stress test from 100,000 to 2 million and adjusts test settings to reduce measurement artifacts. There is no change to production code and no security relevance.
No action required; this is a benign test-only change.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff modifies tests/test_coinmoves.py: test_generate_coinmoves now uses 2,000,000 entries instead of 100,000, sets log-level to ‘info’, and removes the dev-save-plugin-io option and memleak detection during the benchmark. These are test-harness tuning changes only.
Changed components
tests/test_coinmoves.pyInspect captured patch +5 / −3
diff --git a/tests/test_coinmoves.py b/tests/test_coinmoves.py
index 0eefdadd..d9366cd6 100644
--- a/tests/test_coinmoves.py
+++ b/tests/test_coinmoves.py
@@ -2093,7 +2093,7 @@ def test_migration_no_bkpr(node_factory, bitcoind):
def test_generate_coinmoves(node_factory, bitcoind, executor):
- l1, l2, l3 = node_factory.line_graph(3, wait_for_announce=True)
+ l1, l2, l3 = node_factory.line_graph(3, wait_for_announce=True, opts={'log-level': 'info'})
# Route some payments
l1.rpc.xpay(l3.rpc.invoice(1, "test_generate_coinmoves", "test_generate_coinmoves")['bolt11'])
@@ -2110,8 +2110,8 @@ def test_generate_coinmoves(node_factory, bitcoind, executor):
next_timestamp = entries[-1]['timestamp'] + 1
batch = []
- # Let's make 100,000 entries.
- for _ in range(100_000 // len(entries)):
+ # Let's make 2 million entries.
+ for _ in range(2_000_000 // len(entries)):
# Random payment_hash
entries[0]['payment_hash'] = entries[1]['payment_hash'] = random.randbytes(32)
entries[2]['payment_hash'] = random.randbytes(32)
@@ -2144,6 +2144,8 @@ def test_generate_coinmoves(node_factory, bitcoind, executor):
# Memleak detection here creates significant overhead!
del l2.daemon.env["LIGHTNINGD_DEV_MEMLEAK"]
+ # Don't bother recording all our io.
+ del l2.daemon.opts['dev-save-plugin-io']
l2.start()
def measure_latency(node, stop_event):
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.