Skip to main content

Module block

Module block 

Expand description

Block abstraction.

This module provides the core block types and transformations:

// Basic block flow
let block: B = block;

// Seal (compute hash)
let sealed: SealedBlock<B> = block.seal();

// Recover senders
let recovered: RecoveredBlock<B> = sealed.try_recover()?;

// Access components
let senders = recovered.senders();
let hash = recovered.hash();

Modules§

body
Block body abstraction.
error
Error types for the block module.
header
Block header data primitive.

Structs§

RecoveredBlock
A block with senders recovered from the block’s transactions.
SealedBlock
Sealed full block composed of the block’s header and body.
SealedBlockWith
A SealedBlock paired with associated data.

Traits§

Block
Abstraction of block data type.
FullBlock
Helper trait that unifies all behaviour required by block to support full node operations.
TestBlocktest-utils
An extension trait for Blocks that allows for mutable access to the block’s internals.

Type Aliases§

BlockTx
Helper trait to access BlockBody::Transaction given a Block.