Trait UnitFinalizationHandler

Source
pub trait UnitFinalizationHandler:
    Sync
    + Send
    + 'static {
    type Data: Data;
    type Hasher: Hasher;

    // Required method
    fn batch_finalized(
        &mut self,
        batch: Vec<OrderedUnit<Self::Data, Self::Hasher>>,
    );
}
Expand description

The source of finalization of the units that consensus produces.

The UnitFinalizationHandler::batch_finalized method is called whenever a batch of units has been finalized, in order of finalization.

Required Associated Types§

Required Methods§

Source

fn batch_finalized(&mut self, batch: Vec<OrderedUnit<Self::Data, Self::Hasher>>)

A batch of units, that contains data provided by DataProvider::get_data, has been finalized. The calls to this function follow the order of finalization.

Implementors§