1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
//! Implementations and definitions of traits used in legacy abft
use crate::data_io::{
    legacy::{PhronData, DataProvider, OrderedDataInterpreter},
    ChainInfoProvider,
};

#[async_trait::async_trait]
impl legacy_aleph_bft::DataProvider<PhronData> for DataProvider {
    async fn get_data(&mut self) -> Option<PhronData> {
        DataProvider::get_data(self).await
    }
}

impl<CIP> legacy_aleph_bft::FinalizationHandler<PhronData> for OrderedDataInterpreter<CIP>
where
    CIP: ChainInfoProvider,
{
    fn data_finalized(&mut self, data: PhronData) {
        OrderedDataInterpreter::data_finalized(self, data)
    }
}