Skip to content

Commit

Permalink
Reward Indexer uses rewardv2 report for indexing (#876)
Browse files Browse the repository at this point in the history
RewardV2 has been written out for some time now, switch indexer over to use it so we can stop writing rewardv1
  • Loading branch information
michaeldjeffrey authored Oct 17, 2024
1 parent 0fc7d5e commit 38e3329
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions reward_index/src/indexer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 38e3329

Please sign in to comment.