Early exit if buffered packets is empty
This commit is contained in:
parent
8e04fadb05
commit
0887832b00
|
@ -115,6 +115,10 @@ impl BankingStage {
|
||||||
cluster_info: &Arc<RwLock<ClusterInfo>>,
|
cluster_info: &Arc<RwLock<ClusterInfo>>,
|
||||||
buffered_packets: &[(SharedPackets, usize)],
|
buffered_packets: &[(SharedPackets, usize)],
|
||||||
) -> bool {
|
) -> bool {
|
||||||
|
if buffered_packets.is_empty() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
let rcluster_info = cluster_info.read().unwrap();
|
let rcluster_info = cluster_info.read().unwrap();
|
||||||
|
|
||||||
// If there's a bank, and leader is available, forward the buffered packets
|
// If there's a bank, and leader is available, forward the buffered packets
|
||||||
|
|
Loading…
Reference in New Issue