#[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: u64
The starting block height of the rewards distribution in the current epoch
num_partitions: u64
Number of partitions in the rewards distribution in the current epoch, used to generate an EpochRewardsHasher
parent_blockhash: Hash
The blockhash of the parent block of the first block in the epoch, used to seed an EpochRewardsHasher
total_points: u128
The total rewards points calculated for the current epoch, where points equals the sum of (delegated stake * credits observed) for all delegations
total_rewards: u64
The 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: u64
The rewards currently distributed for the current epoch, in lamports
active: bool
Whether 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§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<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for EpochRewards
impl PartialEq for EpochRewards
Source§impl Serialize for EpochRewards
impl Serialize for EpochRewards
Source§impl Sysvar for EpochRewards
impl Sysvar for EpochRewards
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