Trait penumbra_stake::component::stake::StateReadExt

source ·
pub trait StateReadExt: StateRead {
    // Provided methods
    fn get_stake_params<'life0, 'async_trait>(
        &'life0 self
    ) -> Pin<Box<dyn Future<Output = Result<StakeParameters>> + Send + 'async_trait>>
       where Self: Sync + 'async_trait,
             'life0: 'async_trait { ... }
    fn signed_blocks_window_len<'life0, 'async_trait>(
        &'life0 self
    ) -> Pin<Box<dyn Future<Output = Result<u64>> + Send + 'async_trait>>
       where Self: Sync + 'async_trait,
             'life0: 'async_trait { ... }
    fn missed_blocks_maximum<'life0, 'async_trait>(
        &'life0 self
    ) -> Pin<Box<dyn Future<Output = Result<u64>> + Send + 'async_trait>>
       where Self: Sync + 'async_trait,
             'life0: 'async_trait { ... }
    fn get_delegation_changes_tally(&self) -> DelegationChanges { ... }
    fn get_current_base_rate<'life0, 'async_trait>(
        &'life0 self
    ) -> Pin<Box<dyn Future<Output = Result<BaseRateData>> + Send + 'async_trait>>
       where Self: Sync + 'async_trait,
             'life0: 'async_trait { ... }
    fn get_previous_base_rate(&self) -> Option<BaseRateData> { ... }
    fn get_funding_queue(
        &self
    ) -> Option<Vec<(IdentityKey, FundingStreams, Amount)>> { ... }
    fn get_delegation_changes<'life0, 'async_trait>(
        &'life0 self,
        height: Height
    ) -> Pin<Box<dyn Future<Output = Result<DelegationChanges>> + Send + 'async_trait>>
       where Self: Sync + 'async_trait,
             'life0: 'async_trait { ... }
}
Available on crate feature component only.
Expand description

Extension trait providing read access to staking data.

Provided Methods§

source

fn get_stake_params<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<StakeParameters>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait,

Gets the stake parameters from the JMT.

source

fn signed_blocks_window_len<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<u64>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait,

source

fn missed_blocks_maximum<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<u64>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait,

source

fn get_delegation_changes_tally(&self) -> DelegationChanges

Delegation changes accumulated over the course of this block, to be persisted at the end of the block for processing at the end of the next epoch.

source

fn get_current_base_rate<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<BaseRateData>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait,

source

fn get_previous_base_rate(&self) -> Option<BaseRateData>

source

fn get_funding_queue( &self ) -> Option<Vec<(IdentityKey, FundingStreams, Amount)>>

Returns the funding queue from object storage (end-epoch).

source

fn get_delegation_changes<'life0, 'async_trait>( &'life0 self, height: Height ) -> Pin<Box<dyn Future<Output = Result<DelegationChanges>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait,

Returns the DelegationChanges at the given Height.

Object Safety§

This trait is not object safe.

Implementors§