Trait client_traits::EngineClient[][src]

pub trait EngineClient: Sync + Send + ChainInfo {
    fn update_sealing(&self, force: ForceUpdateSealing);
fn submit_seal(&self, block_hash: H256, seal: Vec<Bytes>);
fn broadcast_consensus_message(&self, message: Bytes);
fn epoch_transition_for(&self, parent_hash: H256) -> Option<EpochTransition>;
fn as_full_client(&self) -> Option<&dyn BlockChainClient>;
fn block_number(&self, id: BlockId) -> Option<BlockNumber>;
fn block_header(&self, id: BlockId) -> Option<Header>; }

Client facilities used by internally sealing Engines.

Required methods

fn update_sealing(&self, force: ForceUpdateSealing)[src]

Make a new block and seal it.

fn submit_seal(&self, block_hash: H256, seal: Vec<Bytes>)[src]

Submit a seal for a block in the mining queue.

fn broadcast_consensus_message(&self, message: Bytes)[src]

Broadcast a consensus message to the network.

fn epoch_transition_for(&self, parent_hash: H256) -> Option<EpochTransition>[src]

Get the transition to the epoch the given parent hash is part of or transitions to. This will give the epoch that any children of this parent belong to.

The block corresponding the the parent hash must be stored already.

fn as_full_client(&self) -> Option<&dyn BlockChainClient>[src]

Attempt to cast the engine client to a full client.

fn block_number(&self, id: BlockId) -> Option<BlockNumber>[src]

Get a block number by ID.

fn block_header(&self, id: BlockId) -> Option<Header>[src]

Get raw block header data by block id.

Loading content...

Implementors

Loading content...