Type Alias massa_models::block::SecureShareBlock

source ·
pub type SecureShareBlock = SecureShare<Block, BlockId>;
Expand description

Block with associated meta-data and interfaces allowing trust of data in untrusted network

Aliased Type§

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

Fields§

§content: Block

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 SecureShareBlock

source

pub fn bytes_count(&self) -> u64

size in bytes of the whole block

source

pub fn contains_operation(&self, op: SecureShareOperation) -> bool

true if given operation is included in the block

source

pub fn get_fitness(&self) -> u64

returns the fitness of the block