Skip to main content

StatusService

Trait StatusService 

Source
pub trait StatusService:
    Send
    + Sync
    + 'static {
    // Required methods
    fn get_block_height<'life0, 'async_trait>(
        &'life0 self,
        request: Request<GetBlockHeightRequest>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<BlockHeightResponse>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn get_success_rate<'life0, 'async_trait>(
        &'life0 self,
        request: Request<GetSuccessRateRequest>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<SuccessRateResponse>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn get_time_since_last_decide<'life0, 'async_trait>(
        &'life0 self,
        request: Request<GetTimeSinceLastDecideRequest>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<TimeSinceLastDecideResponse>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn get_node_keys<'life0, 'async_trait>(
        &'life0 self,
        request: Request<GetNodeKeysRequest>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<NodeKeysResponse>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Generated trait containing gRPC methods that should be implemented for use with StatusServiceServer.

Required Methods§

Source

fn get_block_height<'life0, 'async_trait>( &'life0 self, request: Request<GetBlockHeightRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<BlockHeightResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get the height of the latest decided block

Source

fn get_success_rate<'life0, 'async_trait>( &'life0 self, request: Request<GetSuccessRateRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<SuccessRateResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get the fraction of views in which this node decided a block

Source

fn get_time_since_last_decide<'life0, 'async_trait>( &'life0 self, request: Request<GetTimeSinceLastDecideRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<TimeSinceLastDecideResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get the seconds elapsed since this node last decided a block

Source

fn get_node_keys<'life0, 'async_trait>( &'life0 self, request: Request<GetNodeKeysRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<NodeKeysResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get the node’s public keys

Implementors§