2020-09-25 16:19:03 -07:00
|
|
|
//! DEPRECATED: This sysvar can be removed once the pico-inflation feature is enabled
|
2019-06-19 19:46:47 -07:00
|
|
|
//!
|
2020-10-29 19:16:52 +00:00
|
|
|
use crate::sysvar::Sysvar;
|
2019-06-19 19:46:47 -07:00
|
|
|
|
2019-11-21 16:34:40 -08:00
|
|
|
crate::declare_sysvar_id!("SysvarRewards111111111111111111111111111111", Rewards);
|
2019-06-19 19:46:47 -07:00
|
|
|
|
|
|
|
#[repr(C)]
|
|
|
|
#[derive(Serialize, Deserialize, Debug, Default, PartialEq)]
|
|
|
|
pub struct Rewards {
|
|
|
|
pub validator_point_value: f64,
|
2020-05-14 18:22:47 -07:00
|
|
|
pub unused: f64,
|
2019-06-19 19:46:47 -07:00
|
|
|
}
|
2020-10-29 19:16:52 +00:00
|
|
|
impl Rewards {
|
|
|
|
pub fn new(validator_point_value: f64) -> Self {
|
|
|
|
Self {
|
|
|
|
validator_point_value,
|
|
|
|
unused: 0.0,
|
|
|
|
}
|
2019-06-21 20:43:24 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-10-29 19:16:52 +00:00
|
|
|
impl Sysvar for Rewards {}
|