use tower::ServiceExt; pub mod genesis; pub mod hardforks; #[cfg(feature = "rpc")] pub mod rpc; #[derive(Debug, thiserror::Error)] pub enum Error { #[error("Invalid hard fork version: {0}")] InvalidHardForkVersion(&'static str), #[error("Database error: {0}")] Database(#[from] tower::BoxError), } pub trait Database: tower::Service { } impl> Database for T { } #[derive(Debug)] pub enum DatabaseRequest { BlockHeader(cuprate_common::BlockID), ChainHeight, } #[derive(Debug)] pub enum DatabaseResponse { BlockHeader(monero_serai::block::BlockHeader), ChainHeight(u64), }