Skip to main content

NodeClientExt

Trait NodeClientExt 

Source
pub trait NodeClientExt: NodeClient {
    // Required methods
    fn cached_super_segment_headers<'life0, 'async_trait>(
        &'life0 self,
        super_segment_indices: Vec<SuperSegmentIndex>,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<Option<SuperSegmentHeader>>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn last_super_segment_headers<'life0, 'async_trait>(
        &'life0 self,
        limit: u32,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<Option<SuperSegmentHeader>>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Node Client extension methods that are not necessary for a farmer as a library but might be useful for an app

Required Methods§

Source

fn cached_super_segment_headers<'life0, 'async_trait>( &'life0 self, super_segment_indices: Vec<SuperSegmentIndex>, ) -> Pin<Box<dyn Future<Output = Result<Vec<Option<SuperSegmentHeader>>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get the cached super segment headers for the given super segment indices. If there is a cache, it is not updated to avoid remote denial of service.

Returns None for super segment indices that are not in the cache.

Source

fn last_super_segment_headers<'life0, 'async_trait>( &'life0 self, limit: u32, ) -> Pin<Box<dyn Future<Output = Result<Vec<Option<SuperSegmentHeader>>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get up to limit most recent super segment headers. If there is a cache, it is not updated to avoid remote denial of service.

If the node or cache has less than limit super segment headers, the returned vector will be shorter. Each returned super segment header is wrapped in Some.

Implementors§