diff --git a/core/src/fetch_stage.rs b/core/src/fetch_stage.rs index 7c043248cb..9b70f5a3f0 100644 --- a/core/src/fetch_stage.rs +++ b/core/src/fetch_stage.rs @@ -61,6 +61,10 @@ impl FetchStage { while let Ok(more) = recvr.try_recv() { len += more.packets.len(); batch.push(more); + // Read at most 1K transactions in a loop + if len > 1024 { + break; + } } if poh_recorder.lock().unwrap().would_be_leader(