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
Transactions in this blocks’ casual history at and before the cutoff round
will not receive accept votes from this block.
Only BlockV3 carries this — earlier variants panic.
Sourcefn commit_votes(&self) -> &[CommitRef]
fn commit_votes(&self) -> &[CommitRef]
Votes on commits observed by this authority.