penumbra_stake::component::stake

Trait 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.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§