#[repr(C, align(16))]pub struct EpochRewards {
pub distribution_starting_block_height: u64,
pub num_partitions: u64,
pub parent_blockhash: Hash,
pub total_points: u128,
pub total_rewards: u64,
pub distributed_rewards: u64,
pub active: bool,
}Fields§
§distribution_starting_block_height: u64The starting block height of the rewards distribution in the current epoch
num_partitions: u64Number of partitions in the rewards distribution in the current epoch, used to generate an EpochRewardsHasher
parent_blockhash: HashThe blockhash of the parent block of the first block in the epoch, used to seed an EpochRewardsHasher
total_points: u128The total rewards points calculated for the current epoch, where points equals the sum of (delegated stake * credits observed) for all delegations
total_rewards: u64The total rewards calculated for the current epoch. This may be greater
than the total distributed_rewards at the end of the rewards period,
due to rounding and inability to deliver rewards smaller than 1 lamport.
distributed_rewards: u64The rewards currently distributed for the current epoch, in lamports
active: boolWhether the rewards period (including calculation and distribution) is active
Implementations§
Source§impl EpochRewards
impl EpochRewards
pub fn distribute(&mut self, amount: u64)
Trait Implementations§
Source§impl Clone for EpochRewards
impl Clone for EpochRewards
Source§fn clone(&self) -> EpochRewards
fn clone(&self) -> EpochRewards
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for EpochRewards
impl Debug for EpochRewards
Source§impl Default for EpochRewards
impl Default for EpochRewards
Source§fn default() -> EpochRewards
fn default() -> EpochRewards
Source§impl<'de> Deserialize<'de> for EpochRewards
impl<'de> Deserialize<'de> for EpochRewards
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<EpochRewards, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<EpochRewards, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for EpochRewards
impl PartialEq for EpochRewards
Source§impl Serialize for EpochRewards
impl Serialize for EpochRewards
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Source§impl Sysvar for EpochRewards
impl Sysvar for EpochRewards
Source§fn get() -> Result<EpochRewards, ProgramError>
fn get() -> Result<EpochRewards, ProgramError>
Source§fn from_account_info(
account_info: &AccountInfo<'_>,
) -> Result<Self, ProgramError>
fn from_account_info( account_info: &AccountInfo<'_>, ) -> Result<Self, ProgramError>
AccountInfo. Read moreSource§fn to_account_info(&self, account_info: &mut AccountInfo<'_>) -> Option<()>
fn to_account_info(&self, account_info: &mut AccountInfo<'_>) -> Option<()>
AccountInfo. Read more