Use static memory layout for all sysvars (#249)
Co-authored-by: Richard Patel <ripatel@jumptrading.com>
This commit is contained in:
parent
4425dbea91
commit
fb01ab28ec
|
@ -7,6 +7,8 @@
|
|||
//! [`sysvar::epoch_rewards`]: crate::sysvar::epoch_rewards
|
||||
|
||||
use std::ops::AddAssign;
|
||||
|
||||
#[repr(C)]
|
||||
#[derive(Debug, Serialize, Deserialize, PartialEq, Eq, Default, Clone, Copy, AbiExample)]
|
||||
pub struct EpochRewards {
|
||||
/// total rewards for the current epoch, in lamports
|
||||
|
|
|
@ -6,6 +6,7 @@ use {
|
|||
log::*,
|
||||
};
|
||||
|
||||
#[repr(C)]
|
||||
#[derive(Serialize, Deserialize, Default, PartialEq, Eq, Clone, Copy, Debug, AbiExample)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct FeeCalculator {
|
||||
|
|
|
@ -11,6 +11,7 @@ use std::ops::Deref;
|
|||
|
||||
pub const MAX_ENTRIES: usize = 512; // it should never take as many as 512 epochs to warm up or cool down
|
||||
|
||||
#[repr(C)]
|
||||
#[derive(Debug, Serialize, Deserialize, PartialEq, Eq, Default, Clone, AbiExample)]
|
||||
pub struct StakeHistoryEntry {
|
||||
pub effective: u64, // effective stake at this epoch
|
||||
|
|
Loading…
Reference in New Issue