use std::{fmt::Debug, hash::Hash, num::NonZeroUsize};
use parity_scale_codec::{Decode, Encode};
mod data_interpreter;
mod data_provider;
mod data_store;
mod proposal;
mod status_provider;
pub use data_interpreter::OrderedDataInterpreter;
pub use data_provider::{ChainTracker, DataProvider};
pub use data_store::{DataStore};
pub use proposal::UnvalidatedPhronProposal;
pub const MAX_DATA_BRANCH_LEN: usize = 7;
#[derive(Clone, Debug, Encode, Decode, Hash, PartialEq, Eq)]
pub struct PhronData {
pub head_proposal: UnvalidatedPhronProposal,
}
pub trait PhronNetworkMessage: Clone + Debug {
fn included_data(&self) -> Vec<PhronData>;
}
#[derive(Clone, Debug)]
pub struct ChainInfoCacheConfig {
pub block_cache_capacity: NonZeroUsize,
}
impl Default for ChainInfoCacheConfig {
fn default() -> ChainInfoCacheConfig {
ChainInfoCacheConfig {
block_cache_capacity: NonZeroUsize::new(2000).unwrap(),
}
}
}