Trait ethcore::client::chain_notify::ChainNotify
[−]
[src]
pub trait ChainNotify: Send + Sync { fn new_blocks(&self,
_imported: Vec<H256>,
_invalid: Vec<H256>,
_enacted: Vec<H256>,
_retracted: Vec<H256>,
_sealed: Vec<H256>,
_proposed: Vec<Bytes>,
_duration: u64) { ... } fn start(&self) { ... } fn stop(&self) { ... } fn broadcast(&self, _data: Vec<u8>) { ... } fn transactions_received(&self, _hashes: Vec<H256>, _peer_id: usize) { ... } }
Represents what has to be handled by actor listening to chain events
Provided Methods
fn new_blocks(&self,
_imported: Vec<H256>,
_invalid: Vec<H256>,
_enacted: Vec<H256>,
_retracted: Vec<H256>,
_sealed: Vec<H256>,
_proposed: Vec<Bytes>,
_duration: u64)
_imported: Vec<H256>,
_invalid: Vec<H256>,
_enacted: Vec<H256>,
_retracted: Vec<H256>,
_sealed: Vec<H256>,
_proposed: Vec<Bytes>,
_duration: u64)
fires when chain has new blocks.
fn start(&self)
fires when chain achieves active mode
fn stop(&self)
fires when chain achieves passive mode
fn broadcast(&self, _data: Vec<u8>)
fires when chain broadcasts a message
fn transactions_received(&self, _hashes: Vec<H256>, _peer_id: usize)
fires when new transactions are received from a peer
Trait Implementations
impl IpcConfig for ChainNotify
[src]
fn api_version() -> Version
Current service api version Should be increased if any of the methods changes signature Read more
fn protocol_version() -> Version
Current ipc protocol version Should be increased only if signature of system methods changes Read more
fn handshake(handshake: &Handshake) -> bool
Default handshake requires exact versions match
Implementors
impl ChainNotify for Watcher