consensus_core

Trait BlockAPI

Source
pub trait BlockAPI {
    // Required methods
    fn epoch(&self) -> Epoch;
    fn round(&self) -> Round;
    fn author(&self) -> AuthorityIndex;
    fn slot(&self) -> Slot;
    fn timestamp_ms(&self) -> BlockTimestampMs;
    fn ancestors(&self) -> &[BlockRef];
    fn transactions(&self) -> &[Transaction];
    fn transactions_data(&self) -> Vec<&[u8]>;
    fn commit_votes(&self) -> &[CommitRef];
    fn transaction_votes(&self) -> &[BlockTransactionVotes];
    fn misbehavior_reports(&self) -> &[MisbehaviorReport];
}

Required Methods§

Source

fn epoch(&self) -> Epoch

Source

fn round(&self) -> Round

Source

fn author(&self) -> AuthorityIndex

Source

fn slot(&self) -> Slot

Source

fn timestamp_ms(&self) -> BlockTimestampMs

Source

fn ancestors(&self) -> &[BlockRef]

Source

fn transactions(&self) -> &[Transaction]

Source

fn transactions_data(&self) -> Vec<&[u8]>

Source

fn commit_votes(&self) -> &[CommitRef]

Source

fn transaction_votes(&self) -> &[BlockTransactionVotes]

Source

fn misbehavior_reports(&self) -> &[MisbehaviorReport]

Implementors§