Module ethcore::block[][src]

Base data structure of this module is Block.

Blocks can be produced by a local node or they may be received from the network.

To create a block locally, we start with an OpenBlock. This block is mutable and can be appended to with transactions and uncles.

When ready, OpenBlock can be closed and turned into a ClosedBlock. A ClosedBlock can be reopend again by a miner under certain circumstances. On block close, state commit is performed.

LockedBlock is a version of a ClosedBlock that cannot be reopened. It can be sealed using an engine.

ExecutedBlock is an underlaying data structure used by all structs above to store block related info.

Structs

Block

A block, encoded as it is on the block chain.

ClosedBlock

Just like OpenBlock, except that we've applied Engine::on_close_block, finished up the non-seal header fields, and collected the uncles.

ExecutedBlock

An internal type for a block's common elements.

LockedBlock

Just like ClosedBlock except that we can't reopen it and it's faster.

OpenBlock

Block that is ready for transactions to be added.

SealedBlock

A block that has a valid seal.

Traits

Drain

Trait for an object that owns an ExecutedBlock

IsBlock

Trait for a object that is a ExecutedBlock.

Functions

enact_verified

Enact the block given by block_bytes using engine on the database db with given parent block header