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
use super::Block;
use crate::errors::BoxedError;
use serde::{Deserialize, Serialize};
pub enum ChainStates {
Appending,
Computing,
Connecting,
Determining
}
pub trait ChainSpecification {
type Appellation;
type Conduct;
type Configuration;
type Data;
fn activate(appellation: Self::Appellation, configuration: Self::Configuration) -> Self;
fn client(&mut self) -> Result<(), BoxedError>;
}
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct Chain {
blocks: Vec<Block>,
}