use crate::{block, chain, time::Time};
#[derive(Clone, Debug)]
pub struct Info {
pub id: chain::Id,
pub height: block::Height,
pub last_block_id: Option<block::Id>,
pub time: Option<Time>,
}
impl Info {
pub fn new<I>(id: I) -> Self
where
I: Into<chain::Id>,
{
Self {
id: id.into(),
height: Default::default(),
last_block_id: None,
time: None,
}
}
}