Skip to content

Commit 6241f2a

Browse files
authored
Merge pull request #3742 from TheBlueMatt/2025-04-fst-faster
Limit `full_stack` fuzz runtime by limiting block connection ops
2 parents 22d4b42 + 7e631c0 commit 6241f2a

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

fuzz/src/full_stack.rs

+8
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,14 @@ impl<'a> MoneyLossDetector<'a> {
299299
}
300300

301301
fn connect_block(&mut self, all_txn: &[Transaction]) {
302+
if self.blocks_connected > 50_000 {
303+
// Connecting blocks is relatively slow, and some commands can connect many blocks.
304+
// This can inflate the total runtime substantially, leading to spurious timeouts.
305+
// Instead, because block connection rate is expected to be limited by PoW, simply
306+
// start ignoring blocks after the first 50k.
307+
return;
308+
}
309+
302310
let mut txdata = Vec::with_capacity(all_txn.len());
303311
for (idx, tx) in all_txn.iter().enumerate() {
304312
let txid = tx.compute_txid();

0 commit comments

Comments
 (0)