Trait ethcore::client::EngineClient
[−]
[src]
pub trait EngineClient: Sync + Send + ChainInfo { fn update_sealing(&self); 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<&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)
Make a new block and seal it.
fn submit_seal(&self, block_hash: H256, seal: Vec<Bytes>)
Submit a seal for a block in the mining queue.
fn broadcast_consensus_message(&self, message: Bytes)
Broadcast a consensus message to the network.
fn epoch_transition_for(&self, parent_hash: H256) -> Option<EpochTransition>
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<&BlockChainClient>
Attempt to cast the engine client to a full client.
fn block_number(&self, id: BlockId) -> Option<BlockNumber>
Get a block number by ID.
fn block_header(&self, id: BlockId) -> Option<Header>
Get raw block header data by block id.
Implementors
impl EngineClient for Client
impl EngineClient for TestBlockChainClient