Crate sp_blockchain

Source
Expand description

Substrate blockchain traits and primitives.

Structs§

BlockGap
Represents the block gap resulted by warp sync or fast sync.
CachedHeaderMetadata
Cached header metadata. Used to efficiently traverse the tree.
DisplacedLeavesAfterFinalization
Result of Backend::displaced_leaves_after_finalizing.
HashAndNumber
Hash and number of a block.
HeaderMetadataCache
Caches header metadata in an in-memory LRU cache.
Info
Blockchain info
TreeRoute
A tree-route from one block to another in the chain.

Enums§

ApplyExtrinsicFailed
Error when the runtime failed to apply an extrinsic.
BlockGapType
Represents the type of block gaps that may result from either warp sync or fast sync.
BlockStatus
Block status.
Error
Substrate Client error

Traits§

Backend
Blockchain database backend. Does not perform any validation.
ForkBackend
Handles stale forks.
HeaderBackend
Blockchain database header backend. Does not perform any validation.
HeaderMetadata
Handles header metadata: hash, number, parent hash, etc.

Functions§

lowest_common_ancestor
Get the lowest common ancestor between two blocks in the tree.
tree_route
Compute a tree-route between two blocks. See tree-route docs for more details.

Type Aliases§

Result
Client Result type alias