solana_program/sysvar/rewards.rs
1//! DEPRECATED: This sysvar can be removed once the pico-inflation feature is enabled
2//!
3use crate::sysvar::Sysvar;
4
5crate::declare_sysvar_id!("SysvarRewards111111111111111111111111111111", Rewards);
6
7#[repr(C)]
8#[derive(Serialize, Deserialize, Debug, Default, PartialEq)]
9pub struct Rewards {
10 pub validator_point_value: f64,
11 pub unused: f64,
12}
13impl Rewards {
14 pub fn new(validator_point_value: f64) -> Self {
15 Self {
16 validator_point_value,
17 unused: 0.0,
18 }
19 }
20}
21
22impl Sysvar for Rewards {}