Trait ethcore::verification::queue::kind::Kind[][src]

pub trait Kind: 'static + Sized + Send + Sync {
    type Input: Sized + Send + BlockLike + HeapSizeOf;
    type Unverified: Sized + Send + BlockLike + HeapSizeOf;
    type Verified: Sized + Send + BlockLike + HeapSizeOf;
    fn create(
        input: Self::Input,
        engine: &EthEngine
    ) -> Result<Self::Unverified, Error>;
fn verify(
        unverified: Self::Unverified,
        engine: &EthEngine,
        check_seal: bool
    ) -> Result<Self::Verified, Error>; }

Defines transitions between stages of verification.

It starts with a fallible transformation from an "input" into the unverified item. This consists of quick, simply done checks as well as extracting particular data.

Then, there is a verify function which performs more expensive checks and produces the verified output.

For correctness, the hashes produced by each stage of the pipeline should be consistent.

Associated Types

The first stage: completely unverified.

The second stage: partially verified.

The third stage: completely verified.

Required Methods

Attempt to create the Unverified item from the input.

Attempt to verify the Unverified item using the given engine.

Implementors