Skip to content

Commit

Permalink
Use CliEpochRewardsMetadata::default to handle deprecation warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
CriesofCarrots committed Jan 7, 2025
1 parent 804c401 commit 576a57c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cli-output/src/cli_output.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1021,7 +1021,7 @@ pub struct CliKeyedEpochReward {
pub reward: Option<CliEpochReward>,
}

#[derive(Serialize, Deserialize)]
#[derive(Serialize, Deserialize, Default)]
#[serde(rename_all = "camelCase")]
pub struct CliEpochRewardsMetadata {
pub epoch: Epoch,
Expand Down
3 changes: 1 addition & 2 deletions cli/src/inflation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,7 @@ fn process_rewards(
}
Some(CliEpochRewardsMetadata {
epoch: first_reward.epoch,
effective_slot: 0, // Deprecated
block_time: 0, // Deprecated
..CliEpochRewardsMetadata::default()
})
} else {
None
Expand Down

0 comments on commit 576a57c

Please sign in to comment.