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 transaction_votes(&self) -> &[BlockTransactionVotes];
fn transaction_votes_cutoff_round(&self) -> Round;
fn commit_votes(&self) -> &[CommitRef];
fn misbehavior_reports(&self) -> &[MisbehaviorReport];
}Required Methods§
fn epoch(&self) -> Epoch
fn round(&self) -> Round
fn slot(&self) -> Slot
fn timestamp_ms(&self) -> BlockTimestampMs
fn ancestors(&self) -> &[BlockRef]
Sourcefn transactions(&self) -> &[Transaction]
fn transactions(&self) -> &[Transaction]
Transactions included in this block.
fn transactions_data(&self) -> Vec<&[u8]>
Sourcefn transaction_votes(&self) -> &[BlockTransactionVotes]
fn transaction_votes(&self) -> &[BlockTransactionVotes]
Votes on if a transaction should be accepted or rejected.
Sourcefn transaction_votes_cutoff_round(&self) -> Round
fn transaction_votes_cutoff_round(&self) -> Round
Highest round for which this block does not carry implicit accept votes. V1 and V2 use the genesis round because they have no cutoff.
Sourcefn commit_votes(&self) -> &[CommitRef]
fn commit_votes(&self) -> &[CommitRef]
Votes on commits observed by this authority.