[][src]Enum sc_consensus_manual_seal::rpc::EngineCommand

pub enum EngineCommand<Hash> {
    SealNewBlock {
        create_empty: bool,
        finalize: bool,
        parent_hash: Option<Hash>,
        sender: Sender<CreatedBlock<Hash>>,
    },
    FinalizeBlock {
        hash: Hash,
        sender: Sender<()>,
        justification: Option<Justification>,
    },
}

Message sent to the background authorship task, usually by RPC.

Variants

SealNewBlock

Tells the engine to propose a new block

if create_empty == true, it will create empty blocks if there are no transactions in the transaction pool.

if finalize == true, the block will be instantly finalized.

Fields of SealNewBlock

create_empty: bool

if true, empty blocks(without extrinsics) will be created. otherwise, will return Error::EmptyTransactionPool.

finalize: bool

instantly finalize this block?

parent_hash: Option<Hash>

specify the parent hash of the about-to-created block

sender: Sender<CreatedBlock<Hash>>

sender to report errors/success to the rpc.

FinalizeBlock

Tells the engine to finalize the block with the supplied hash

Fields of FinalizeBlock

hash: Hash

hash of the block

sender: Sender<()>

sender to report errors/success to the rpc.

justification: Option<Justification>

finalization justification

Auto Trait Implementations

impl<Hash> !RefUnwindSafe for EngineCommand<Hash>

impl<Hash> Send for EngineCommand<Hash> where
    Hash: Send

impl<Hash> Sync for EngineCommand<Hash> where
    Hash: Send + Sync

impl<Hash> Unpin for EngineCommand<Hash> where
    Hash: Unpin

impl<Hash> !UnwindSafe for EngineCommand<Hash>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> CheckedConversion for T[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, Outer> IsWrappedBy<Outer> for T where
    Outer: AsRef<T> + AsMut<T> + From<T>,
    T: From<Outer>, 
[src]

fn from_ref(outer: &Outer) -> &T[src]

Get a reference to the inner from the outer.

fn from_mut(outer: &mut Outer) -> &mut T[src]

Get a mutable reference to the inner from the outer.

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> SaturatedConversion for T

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<S, T> UncheckedInto<T> for S where
    T: UncheckedFrom<S>, 
[src]

impl<T, S> UniqueSaturatedInto<T> for S where
    S: TryInto<T>,
    T: Bounded

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,