prioritize repair requests by stake (#29730)

This commit is contained in:
Jeff Biseda 2023-01-17 18:38:10 -08:00 committed by GitHub
parent 8e02744c73
commit f9062718c4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 7 deletions

View File

@ -469,14 +469,10 @@ impl ServeRepair {
let my_id = identity_keypair.pubkey();
let cluster_type = root_bank.cluster_type();
let max_buffered_packets = if cluster_type != ClusterType::MainnetBeta {
if self.repair_whitelist.read().unwrap().len() > 0 {
4 * MAX_REQUESTS_PER_ITERATION
} else {
2 * MAX_REQUESTS_PER_ITERATION
}
let max_buffered_packets = if self.repair_whitelist.read().unwrap().len() > 0 {
4 * MAX_REQUESTS_PER_ITERATION
} else {
MAX_REQUESTS_PER_ITERATION
2 * MAX_REQUESTS_PER_ITERATION
};
let mut dropped_requests = 0;