Skip to content

Commit

Permalink
Round POC rewards individually
Browse files Browse the repository at this point in the history
Despite talking about POC rewards as a combined number, this HIP pulls
them from seperate buckets. Because the sources of rewards are seperate,
the end values should be treated as discretely.
  • Loading branch information
michaeldjeffrey committed Jul 8, 2024
1 parent 406cd4e commit d1b8908
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions mobile_verifier/src/reward_shares.rs
Original file line number Diff line number Diff line change
Expand Up @@ -747,10 +747,11 @@ impl CalculatedPocRewardShares {
}

fn poc_reward(&self, points: &coverage_point_calculator::CoveragePoints) -> u64 {
let base_reward = self.normal * points.total_base_shares();
let boosted_reward = self.boost * points.total_boosted_shares();
let base_reward = self.normal * points.total_base_shares().to_u64().unwrap_or_default();
let boosted_reward =
self.boost * points.total_boosted_shares().to_u64().unwrap_or_default();

(base_reward + boosted_reward).to_u64().unwrap_or_default()
base_reward + boosted_reward
}
}

Expand Down

0 comments on commit d1b8908

Please sign in to comment.