Trait ethcore::client::ChainNotify
[−]
[src]
pub trait ChainNotify: Send + Sync { fn new_blocks(
&self,
_imported: Vec<H256>,
_invalid: Vec<H256>,
_route: ChainRoute,
_sealed: Vec<H256>,
_proposed: Vec<Bytes>,
_duration: Duration
) { ... } fn start(&self) { ... } fn stop(&self) { ... } fn broadcast(&self, _message_type: ChainMessageType) { ... } fn transactions_received(
&self,
_txs: &[UnverifiedTransaction],
_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>,
_route: ChainRoute,
_sealed: Vec<H256>,
_proposed: Vec<Bytes>,
_duration: Duration
)
&self,
_imported: Vec<H256>,
_invalid: Vec<H256>,
_route: ChainRoute,
_sealed: Vec<H256>,
_proposed: Vec<Bytes>,
_duration: Duration
)
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, _message_type: ChainMessageType)
fires when chain broadcasts a message
fn transactions_received(&self, _txs: &[UnverifiedTransaction], _peer_id: usize)
fires when new transactions are received from a peer
Implementors
impl ChainNotify for Watcher
impl ChainNotify for TestNotify