Fetch stage batching of forwarded txs (#6349)

automerge
This commit is contained in:
Pankaj Garg 2019-10-14 13:32:29 -07:00 committed by Grimes
parent e210e76bd5
commit 3313b2ff58
1 changed files with 4 additions and 0 deletions

View File

@ -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(