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.
- serde_
bincode_ compat - Bincode-compatible header type serde implementations.
Structs§
- Recovered
Block - A block with senders recovered from the block’s transactions.
- Sealed
Block - Sealed full block composed of the block’s header and body.
Traits§
- Block
- Abstraction of block data type.
- Full
Block - Helper trait that unifies all behaviour required by block to support full node operations.
- Test
Block - An extension trait for
Block
s that allows for mutable access to the block’s internals.
Type Aliases§
- BlockTx
- Helper trait to access
BlockBody::Transaction
given aBlock
.