MockHeader

Type Alias MockHeader 

Source
pub type MockHeader = TestBlockHeader;

Aliased Type§

pub struct MockHeader {
    pub block_number: u64,
    pub payload_commitment: VidCommitment,
    pub builder_commitment: BuilderCommitment,
    pub metadata: TestMetadata,
    pub timestamp: u64,
    pub timestamp_millis: u64,
    pub random: u64,
    pub version: Version,
}

Fields§

§block_number: u64

Block number.

§payload_commitment: VidCommitment

VID commitment to the payload.

§builder_commitment: BuilderCommitment

Fast commitment for builder verification

§metadata: TestMetadata

block metadata

§timestamp: u64

Timestamp when this header was created.

§timestamp_millis: u64

Timestamp when this header was created.

§random: u64

random

§version: Version

version

Trait Implementations§

Source§

impl ExplorerHeader<MockTypes> for MockHeader

Source§

type BalanceAmount = i128

BalanceAmount is a type that represents a general balance amount. It does not indicate how this balance is represented, just that there is a representation of it that adheres to the trait restrictions specified.
Source§

type WalletAddress = [u8; 32]

WalletAddress is a type that represents the address of a Wallet. It does not indicate how this address is represented, just that there is a representation of it that adheres to the trait restrictions specified.
Source§

type ProposerId = [u8; 32]

ProposerId is a type that represents the proposer id of the block. It does not indicate how this proposer id is represented, just that there is a representation of it that adheres to the trait restrictions specified.
Source§

fn proposer_id(&self) -> Self::ProposerId

The proposer id of the block as stored within the block header.
Source§

fn fee_info_account(&self) -> Self::WalletAddress

The wallet address of the fee info account contained within the block header.
Source§

fn fee_info_balance(&self) -> Self::BalanceAmount

The balance amount of the fee info contained within the block header.
Source§

fn reward_balance(&self) -> Self::BalanceAmount

The balance amount of the reward for constructing the block.
Source§

fn namespace_ids(&self) -> Vec<i64>

A collection of namespace ids that are contained within the block header.
Source§

impl HeightIndexed for MockHeader

Source§

fn height(&self) -> u64

Source§

impl QueryableHeader<MockTypes> for MockHeader

Source§

type NamespaceId = i64

Serialized representation of a namespace.
Source§

type NamespaceIndex = i64

Index for looking up a namespace.
Source§

fn namespace_id(&self, i: &i64) -> Option<i64>

Resolve a namespace index to the serialized identifier for that namespace.
Source§

fn namespace_size(&self, i: &i64, payload_size: usize) -> u64

Get the size taken up by the given namespace in the payload.