From 397f8b8b50446cfacb45bd33212750fb60dba9da Mon Sep 17 00:00:00 2001 From: Michael Jeffrey Date: Tue, 15 Oct 2024 13:53:27 -0700 Subject: [PATCH] Reward Indexer uses rewardv2 report for indexing RewardV2 has been written out for some time now, switch indexer over to use it so we can stop writing rewardv1 --- reward_index/src/indexer.rs | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/reward_index/src/indexer.rs b/reward_index/src/indexer.rs index 4802f7532..b70e30505 100644 --- a/reward_index/src/indexer.rs +++ b/reward_index/src/indexer.rs @@ -139,19 +139,17 @@ impl Indexer { settings::Mode::Mobile => { let share = MobileRewardShare::decode(msg)?; match share.reward { - Some(MobileReward::RadioReward(r)) => Ok(Some(( + Some(MobileReward::RadioReward(_r)) => { + // RadioReward has been replaced by RadioRewardV2 + Ok(None) + } + Some(MobileReward::RadioRewardV2(r)) => Ok(Some(( RewardKey { key: PublicKeyBinary::from(r.hotspot_key).to_string(), reward_type: RewardType::MobileGateway, }, - r.poc_reward, + r.base_poc_reward + r.boosted_poc_reward, ))), - Some(MobileReward::RadioRewardV2(_)) => { - // NOTE: Eventually radio_reward_v2 will replace - // radio_reward as the source of rewards, then - // radio_reward will cease to be written. - Ok(None) - } Some(MobileReward::GatewayReward(r)) => Ok(Some(( RewardKey {