start tiers at 1

This commit is contained in:
Bryan Stitt 2023-06-16 10:52:13 -07:00
parent af7759e491
commit 3928496be5
2 changed files with 3 additions and 3 deletions

@ -470,8 +470,8 @@ impl Web3Rpcs {
let watch_consensus_head_sender = self.watch_consensus_head_sender.as_ref().unwrap();
let consensus_tier = new_consensus_rpcs.tier;
// TODO: think more about this unwrap
let total_tiers = consensus_finder.worst_tier().unwrap_or(10);
// TODO: think more about the default for total_tiers
let total_tiers = consensus_finder.worst_tier().unwrap_or_default();
let backups_needed = new_consensus_rpcs.backups_needed;
let consensus_head_block = new_consensus_rpcs.head_block.clone();
let num_consensus_rpcs = new_consensus_rpcs.num_consensus_rpcs();

@ -500,7 +500,7 @@ impl ConsensusFinder {
for (rpc, weighted_latency_ms) in weighted_latencies.into_iter() {
let tier = (weighted_latency_ms - min_latency) as f64 / divisor;
let tier = tier.floor() as u32;
let tier = (tier.floor() as u32).saturating_add(1);
// TODO: this should be trace
trace!(