clementine_core::bitcoin_syncer

Trait BlockHandler

Source
pub trait BlockHandler:
    Send
    + Sync
    + 'static {
    // Required method
    fn handle_new_block<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 mut self,
        dbtx: DatabaseTransaction<'life1, 'life2>,
        block_id: u32,
        block: Block,
        height: u32,
    ) -> Pin<Box<dyn Future<Output = Result<(), BridgeError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
}
Expand description

Trait for handling new blocks as they are finalized

Required Methods§

Source

fn handle_new_block<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, dbtx: DatabaseTransaction<'life1, 'life2>, block_id: u32, block: Block, height: u32, ) -> Pin<Box<dyn Future<Output = Result<(), BridgeError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Handle a new finalized block

Implementors§