Trait ethcore_light::client::LightChainClient
[−]
[src]
pub trait LightChainClient: Send + Sync { fn chain_info(&self) -> BlockChainInfo; fn queue_header(&self, header: Header) -> Result<H256, BlockImportError>; fn is_known(&self, hash: &H256) -> bool; fn clear_queue(&self); fn flush_queue(&self); fn queue_info(&self) -> QueueInfo; fn cht_root(&self, i: usize) -> Option<H256>; }
Trait for interacting with the header chain abstractly.
Required Methods
fn chain_info(&self) -> BlockChainInfo
Get chain info.
fn queue_header(&self, header: Header) -> Result<H256, BlockImportError>
Queue header to be verified. Required that all headers queued have their parent queued prior.
fn is_known(&self, hash: &H256) -> bool
Query whether a block is known.
fn clear_queue(&self)
Clear the queue.
fn flush_queue(&self)
Flush the queue.
fn queue_info(&self) -> QueueInfo
Get queue info.
fn cht_root(&self, i: usize) -> Option<H256>
Get the i
th CHT root.
Implementors
impl LightChainClient for Client