Skip to content

Commit

Permalink
Make modeled field in HexPoints public (#842)
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthew Plant authored Jul 22, 2024
1 parent 632b995 commit 89d3820
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion coverage_point_calculator/src/hexes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ pub struct HexPoints {
///
/// This is a convenience field for debugging, hexes can reach similar
/// values through different means, it helps to know the starting value.
modeled: Decimal,
pub modeled: Decimal,
/// Points including Coverage affected multipliers
///
/// modeled + (Rank * Assignment)
Expand Down
12 changes: 6 additions & 6 deletions file_store/src/reward_manifest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ pub struct RewardManifest {
#[derive(Clone, Debug)]
pub enum RewardData {
MobileRewardData {
poc_bones_per_coverage_point: Decimal,
boosted_poc_bones_per_coverage_point: Decimal,
poc_bones_per_reward_share: Decimal,
boosted_poc_bones_per_reward_share: Decimal,
},
IotRewardData {
poc_bones_per_beacon_reward_share: Decimal,
Expand Down Expand Up @@ -49,16 +49,16 @@ impl TryFrom<proto::RewardManifest> for RewardManifest {
reward_data: match value.reward_data {
Some(proto::reward_manifest::RewardData::MobileRewardData(reward_data)) => {
Some(RewardData::MobileRewardData {
poc_bones_per_coverage_point: reward_data
poc_bones_per_reward_share: reward_data
.poc_bones_per_reward_share
.ok_or(DecodeError::empty_field("poc_bones_per_coverage_point"))?
.ok_or(DecodeError::empty_field("poc_bones_per_reward_share"))?
.value
.parse()
.map_err(DecodeError::from)?,
boosted_poc_bones_per_coverage_point: reward_data
boosted_poc_bones_per_reward_share: reward_data
.boosted_poc_bones_per_reward_share
.ok_or(DecodeError::empty_field(
"boosted_poc_bones_per_coverage_point",
"boosted_poc_bones_per_reward_share",
))?
.value
.parse()
Expand Down

0 comments on commit 89d3820

Please sign in to comment.