Adjust packet batching post-decoupling from blobs (#5783)

This commit is contained in:
Pankaj Garg
2019-09-05 11:22:39 -07:00
committed by GitHub
parent f1110f2e85
commit 3237e897d7
3 changed files with 9 additions and 7 deletions

View File

@@ -1,7 +1,7 @@
//! The `streamer` module defines a set of services for efficiently pulling data from UDP sockets.
//!
use crate::packet::{Blob, Packets, PacketsRecycler, SharedBlobs, PACKETS_PER_BLOB};
use crate::packet::{Blob, Packets, PacketsRecycler, SharedBlobs, PACKETS_PER_BATCH};
use crate::result::{Error, Result};
use solana_sdk::timing::duration_as_ms;
use std::net::UdpSocket;
@@ -24,7 +24,7 @@ fn recv_loop(
name: &'static str,
) -> Result<()> {
loop {
let mut msgs = Packets::new_with_recycler(recycler.clone(), PACKETS_PER_BLOB, name);
let mut msgs = Packets::new_with_recycler(recycler.clone(), PACKETS_PER_BATCH, name);
loop {
// Check for exit signal, even if socket is busy
// (for instance the leader trasaction socket)