Trait BlockSpec

Source
pub trait BlockSpec<Dt = String, Id = u8, Hs = Vec<u8>, Nc = u8, Ts = i64> {
    // Required methods
    fn constructor(
        &self,
        id: Id,
        hash: Hs,
        nonce: Nc,
        previous: Hs,
        timestamp: Ts,
        transactions: Vec<Dt>,
    ) -> Self
       where Self: Sized;
    fn consensus(
        &self,
        id: Id,
        hash: Hs,
        previous: Hs,
        timestamp: Ts,
        transactions: Vec<Dt>,
    ) -> (Nc, Hs)
       where Self: Sized;
}

Required Methods§

Source

fn constructor( &self, id: Id, hash: Hs, nonce: Nc, previous: Hs, timestamp: Ts, transactions: Vec<Dt>, ) -> Self
where Self: Sized,

Source

fn consensus( &self, id: Id, hash: Hs, previous: Hs, timestamp: Ts, transactions: Vec<Dt>, ) -> (Nc, Hs)
where Self: Sized,

Implementors§