Type Alias massa_models::block_header::SecuredHeader

source ·
pub type SecuredHeader = SecureShare<BlockHeader, BlockId>;
Expand description

BlockHeader wrapped up alongside verification data

Aliased Type§

struct SecuredHeader {
    pub content: BlockHeader,
    pub serialized_data: Vec<u8>,
    pub signature: Signature,
    pub content_creator_pub_key: PublicKey,
    pub content_creator_address: Address,
    pub id: BlockId,
}

Fields§

§content: BlockHeader

Reference contents. Not required for the security protocols.

Use the Lightweight equivalent structures when you need verifiable serialized data, but do not need to read the values directly (such as when sending)

§serialized_data: Vec<u8>

Content in sharable, deserializable form. Is used in the secure verification protocols.

§signature: Signature

A cryptographically generated value using serialized_data and a public key.

§content_creator_pub_key: PublicKey

The public-key component used in the generation of the signature

§content_creator_address: Address

Derived from the same public key used to generate the signature

§id: BlockId

A secure hash of the data. See also massa_hash::Hash

Implementations§

source§

impl SecuredHeader

source

pub fn get_fitness(&self) -> u64

gets the header fitness