chaos_sdk/data/structures/blockchain/
blocks.rs

1/*
2    Appellation: block
3    Context:
4    Creator: FL03 <jo3mccain@icloud.com>
5    Description:
6        ... Summary ...
7 */
8
9pub enum BlockStates {
10    Computing,
11    Invalid,
12    Valid,
13}
14
15#[derive(Clone, Debug, Hash, PartialEq, serde::Deserialize, serde::Serialize)]
16pub struct Block {
17    pub id: crate::BlockId,
18}
19
20#[cfg(test)]
21mod tests {
22    #[test]
23    fn simple() {
24        let f = |x: usize| x.pow(x.try_into().unwrap());
25        assert_eq!(f(2), 4)
26    }
27}