prioritize repair requests by stake (#29730)
This commit is contained in:
parent
8e02744c73
commit
f9062718c4
|
@ -469,14 +469,10 @@ impl ServeRepair {
|
||||||
let my_id = identity_keypair.pubkey();
|
let my_id = identity_keypair.pubkey();
|
||||||
let cluster_type = root_bank.cluster_type();
|
let cluster_type = root_bank.cluster_type();
|
||||||
|
|
||||||
let max_buffered_packets = if cluster_type != ClusterType::MainnetBeta {
|
let max_buffered_packets = if self.repair_whitelist.read().unwrap().len() > 0 {
|
||||||
if self.repair_whitelist.read().unwrap().len() > 0 {
|
|
||||||
4 * MAX_REQUESTS_PER_ITERATION
|
4 * MAX_REQUESTS_PER_ITERATION
|
||||||
} else {
|
} else {
|
||||||
2 * MAX_REQUESTS_PER_ITERATION
|
2 * MAX_REQUESTS_PER_ITERATION
|
||||||
}
|
|
||||||
} else {
|
|
||||||
MAX_REQUESTS_PER_ITERATION
|
|
||||||
};
|
};
|
||||||
|
|
||||||
let mut dropped_requests = 0;
|
let mut dropped_requests = 0;
|
||||||
|
|
Loading…
Reference in New Issue