StateSynchronizer

Trait StateSynchronizer 

Source
pub trait StateSynchronizer:
    Send
    + Sync
    + 'static {
    // Required methods
    fn initialize<'life0, 'async_trait>(
        &'life0 mut self,
    ) -> Pin<Box<dyn Future<Output = SyncResult<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn start<'async_trait>(
        self,
    ) -> Pin<Box<dyn Future<Output = (SynchronizerTaskHandle, Receiver<SyncResult<StateSyncMessage<BlockHeader>>>)> + Send + 'async_trait>>
       where Self: 'async_trait;
}

Required Methods§

Source

fn initialize<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = SyncResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn start<'async_trait>( self, ) -> Pin<Box<dyn Future<Output = (SynchronizerTaskHandle, Receiver<SyncResult<StateSyncMessage<BlockHeader>>>)> + Send + 'async_trait>>
where Self: 'async_trait,

Starts the state synchronization, consuming the synchronizer. Returns a handle for controlling the running task and a receiver for messages.

Implementors§

Source§

impl<R, D> StateSynchronizer for ProtocolStateSynchronizer<R, D>
where R: RPCClient + Clone + Send + Sync + 'static, D: DeltasClient + Clone + Send + Sync + 'static,