From 576a57cf262d6fc0368ecdbbf0f1931761b925ef Mon Sep 17 00:00:00 2001 From: Tyera Eulberg Date: Tue, 7 Jan 2025 11:41:52 -0700 Subject: [PATCH] Use CliEpochRewardsMetadata::default to handle deprecation warnings --- cli-output/src/cli_output.rs | 2 +- cli/src/inflation.rs | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/cli-output/src/cli_output.rs b/cli-output/src/cli_output.rs index 4043de27808f2b..f3dbb931825474 100644 --- a/cli-output/src/cli_output.rs +++ b/cli-output/src/cli_output.rs @@ -1021,7 +1021,7 @@ pub struct CliKeyedEpochReward { pub reward: Option, } -#[derive(Serialize, Deserialize)] +#[derive(Serialize, Deserialize, Default)] #[serde(rename_all = "camelCase")] pub struct CliEpochRewardsMetadata { pub epoch: Epoch, diff --git a/cli/src/inflation.rs b/cli/src/inflation.rs index 25f19c433cf9c6..88fa7aa1c1e56f 100644 --- a/cli/src/inflation.rs +++ b/cli/src/inflation.rs @@ -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