mithril_aggregator::services

Trait BufferedSingleSignatureStore

source
pub trait BufferedSingleSignatureStore: Sync + Send {
    // Required methods
    fn buffer_signature<'life0, 'life1, 'async_trait>(
        &'life0 self,
        signed_entity_type_discriminant: SignedEntityTypeDiscriminants,
        signature: &'life1 SingleSignatures,
    ) -> Pin<Box<dyn Future<Output = StdResult<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn get_buffered_signatures<'life0, 'async_trait>(
        &'life0 self,
        signed_entity_type_discriminant: SignedEntityTypeDiscriminants,
    ) -> Pin<Box<dyn Future<Output = StdResult<Vec<SingleSignatures>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn remove_buffered_signatures<'life0, 'async_trait>(
        &'life0 self,
        signed_entity_type_discriminant: SignedEntityTypeDiscriminants,
        single_signatures: Vec<SingleSignatures>,
    ) -> Pin<Box<dyn Future<Output = StdResult<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

§BufferedSingleSignatureStore

Allow to buffer single signatures for later use when an open message isn’t available yet.

Required Methods§

source

fn buffer_signature<'life0, 'life1, 'async_trait>( &'life0 self, signed_entity_type_discriminant: SignedEntityTypeDiscriminants, signature: &'life1 SingleSignatures, ) -> Pin<Box<dyn Future<Output = StdResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Buffer a single signature for later use.

source

fn get_buffered_signatures<'life0, 'async_trait>( &'life0 self, signed_entity_type_discriminant: SignedEntityTypeDiscriminants, ) -> Pin<Box<dyn Future<Output = StdResult<Vec<SingleSignatures>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get the buffered single signatures for the given signed entity discriminant.

source

fn remove_buffered_signatures<'life0, 'async_trait>( &'life0 self, signed_entity_type_discriminant: SignedEntityTypeDiscriminants, single_signatures: Vec<SingleSignatures>, ) -> Pin<Box<dyn Future<Output = StdResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Remove the given single signatures from the buffer.

Implementors§