From fb5fa7fb123a858a9f164df4b4d4ad3ac7233a22 Mon Sep 17 00:00:00 2001 From: Michael Jeffrey Date: Thu, 29 Aug 2024 16:23:22 -0700 Subject: [PATCH] use radio_info as the source for all that we can Why pass in information from a source that we're going to be using gratuitously within the same function. Did I spell that right? --- mobile_verifier/src/reward_shares.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/mobile_verifier/src/reward_shares.rs b/mobile_verifier/src/reward_shares.rs index 9c322894f..e5f2d2d00 100644 --- a/mobile_verifier/src/reward_shares.rs +++ b/mobile_verifier/src/reward_shares.rs @@ -652,7 +652,6 @@ impl CoverageShares { fn coverage_points( &self, radio_id: &RadioId, - oracle_boosting_status: OracleBoostingStatus, ) -> anyhow::Result { let radio_info = self.radio_infos.get(radio_id).unwrap(); @@ -671,7 +670,7 @@ impl CoverageShares { radio_info.speedtests.clone(), radio_info.trust_scores.clone(), hexes, - oracle_boosting_status, + radio_info.oracle_boosting_status, )?; Ok(coverage_points) @@ -694,7 +693,7 @@ impl CoverageShares { let mut processed_radios = vec![]; for (radio_id, radio_info) in self.radio_infos.iter() { - let points = match self.coverage_points(radio_id, radio_info.oracle_boosting_status) { + let points = match self.coverage_points(radio_id) { Ok(points) => points, Err(err) => { tracing::error!( @@ -753,7 +752,7 @@ impl CoverageShares { /// Only used for testing pub fn test_hotspot_reward_shares(&self, hotspot: &RadioId) -> Decimal { - self.coverage_points(hotspot, OracleBoostingStatus::Eligible) + self.coverage_points(hotspot) .expect("reward shares for hotspot") .total_shares() }