1pub mod config;
2pub mod network;
3pub mod state;
4pub mod types;
5
6use anyhow::Result;
7use config::NetworkConfig;
8use network::Network;
9use state::StateManager;
10
11#[allow(dead_code)]
12pub struct Node {
13 network: Network,
14 state: StateManager,
15}
16
17impl Node {
18 pub async fn new(config: NetworkConfig) -> Result<Self> {
19 let network = Network::new(config.clone()).await?;
20 let state = StateManager::new(&config.state_db_path)?;
21
22 Ok(Self { network, state })
23 }
24
25 pub async fn start(&mut self) -> Result<()> {
26 Ok(())
28 }
29}