solana_sysvar/
rewards.rs

1//! This sysvar is deprecated and unused.
2#[cfg(feature = "bincode")]
3use crate::Sysvar;
4#[cfg(feature = "serde")]
5use serde_derive::{Deserialize, Serialize};
6pub use solana_sdk_ids::sysvar::rewards::{check_id, id, ID};
7use solana_sysvar_id::impl_sysvar_id;
8
9impl_sysvar_id!(Rewards);
10
11#[repr(C)]
12#[cfg_attr(feature = "serde", derive(Deserialize, Serialize))]
13#[derive(Debug, Default, PartialEq)]
14pub struct Rewards {
15    pub validator_point_value: f64,
16    pub unused: f64,
17}
18impl Rewards {
19    pub fn new(validator_point_value: f64) -> Self {
20        Self {
21            validator_point_value,
22            unused: 0.0,
23        }
24    }
25}
26#[cfg(feature = "bincode")]
27impl Sysvar for Rewards {}