[][src]Module sp_consensus::import_queue

Import Queue primitive: something which can verify and import blocks.

This serves as an intermediate and abstracted step between synchronization and import. Each mode of consensus will have its own requirements for block verification. Some algorithms can verify in parallel, while others only sequentially.

The ImportQueue trait allows such verification strategies to be instantiated. The BasicQueue and BasicVerifier traits allow serial queues to be instantiated simply.

Modules

buffered_link

Provides the buffered_link utility.

Structs

BasicQueue

Interface to a basic block import queue that is importing blocks sequentially in a separate task, with plugable verification.

IncomingBlock

Block data used by the queue.

Enums

BlockImportError

Block import error.

BlockImportResult

Block import successful result.

Traits

ImportQueue

Blocks import queue API.

Link

Hooks that the verification queue can use to influence the synchronization algorithm.

Verifier

Verify a justification of a block

Functions

import_single_block

Single block import function.

Type Definitions

BoxBlockImport

Shared block import struct used by the queue.

BoxFinalityProofImport

Shared finality proof import struct used by the queue.

BoxJustificationImport

Shared justification import struct used by the queue.

CacheKeyId

Type of keys in the blockchain cache that consensus module could use for its needs.

DefaultImportQueue

A commonly-used Import Queue type.

Origin

Maps to the Origin used by the network.