pub(crate) mod block_executor;
pub(crate) mod block_proposer;
pub(crate) mod block_validator;
pub(crate) mod chainspec_loader;
pub(crate) mod consensus;
pub mod contract_runtime;
pub(crate) mod deploy_acceptor;
pub(crate) mod event_stream_server;
pub(crate) mod fetcher;
pub(crate) mod gossiper;
pub(crate) mod linear_chain;
pub(crate) mod linear_chain_sync;
pub(crate) mod rest_server;
pub(crate) mod rpc_server;
#[cfg(test)]
pub mod in_memory_network;
pub(crate) mod metrics;
pub(crate) mod network;
pub(crate) mod small_network;
pub(crate) mod storage;
use once_cell::sync::Lazy;
use semver::Version;
use crate::{
effect::{EffectBuilder, Effects},
NodeRng,
};
pub(crate) static CLIENT_API_VERSION: Lazy<Version> = Lazy::new(|| Version::new(1, 0, 0));
pub trait Component<REv> {
type Event;
type ConstructionError;
fn handle_event(
&mut self,
effect_builder: EffectBuilder<REv>,
rng: &mut NodeRng,
event: Self::Event,
) -> Effects<Self::Event>;
}