1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
mod blockchain;
mod consensus;
mod utils;
pub use crate::{
blockchain::*,
common::*,
consensus::*,
errors::*,
utils::*,
};
pub mod errors {
use std::error::Error;
pub type BoxedError = Box<dyn Error + Send + Sync + 'static>;
}
mod common {
pub use types::*;
pub mod types {
pub type BlockData = String;
pub type BlockId = u64;
pub type BlockHash = String;
pub type BlockNonce = u64;
pub type BlockTime = bson::DateTime;
}
}