acme_chains/core/common.rs
1/*
2 Appellation: common
3 Context:
4 Creator: FL03 <jo3mccain@icloud.com>
5 Description:
6 ... Summary ...
7*/
8pub use constants::*;
9pub use types::*;
10
11mod constants {
12 pub const DIFFICULTY_PREFIX: &str = "00";
13}
14
15mod types {
16 pub type BData = String;
17 pub type BId = u64;
18 pub type BHash = String;
19 pub type BNonce = u64;
20 pub type BTStamp = i64;
21}
22#[cfg(test)]
23mod tests {
24 #[test]
25 fn test() {
26 let f = |x: usize| x.pow(x.try_into().unwrap());
27 assert_eq!(f(2), 4)
28 }
29}