Reduce slow test runtimes to under 60s (#9012)

Co-Authored-By: Mark Liu <mark@prove.com.au>

Co-Authored-By: Michael Sproul <michaelsproul@users.noreply.github.com>
This commit is contained in:
Mark Liu
2026-04-09 15:36:49 +10:00
committed by GitHub
parent 815aad3731
commit 8681e8e06e
4 changed files with 34 additions and 7 deletions

View File

@@ -1088,9 +1088,11 @@ mod tests {
let mut block: BeaconBlockBellatrix<_, FullPayload<Spec>> =
BeaconBlockBellatrix::empty(spec);
// 11,000 × 1KB ≈ 11MB, just above the 10MB max_payload_size.
// Previously used 100,000 txs (~100MB) which made this test take >60s.
let tx = VariableList::try_from(vec![0; 1024]).unwrap();
let txs =
VariableList::try_from(std::iter::repeat_n(tx, 100000).collect::<Vec<_>>()).unwrap();
VariableList::try_from(std::iter::repeat_n(tx, 11000).collect::<Vec<_>>()).unwrap();
block.body.execution_payload.execution_payload.transactions = txs;