Trait ethcore::client::ChainNotify
source · [−]pub trait ChainNotify: Send + Sync {
fn new_blocks(&self, _new_blocks: NewBlocks) { ... }
fn start(&self) { ... }
fn stop(&self) { ... }
fn broadcast(&self, _message_type: ChainMessageType) { ... }
fn block_pre_import(&self, _bytes: &Bytes, _hash: &H256, _difficulty: &U256) { ... }
fn transactions_received(
&self,
_txs: &[UnverifiedTransaction],
_peer_id: usize
) { ... }
}
Expand description
Represents what has to be handled by actor listening to chain events
Provided methods
fn new_blocks(&self, _new_blocks: NewBlocks)
fn new_blocks(&self, _new_blocks: NewBlocks)
fires when chain has new blocks.
fn broadcast(&self, _message_type: ChainMessageType)
fn broadcast(&self, _message_type: ChainMessageType)
fires when chain broadcasts a message
fn block_pre_import(&self, _bytes: &Bytes, _hash: &H256, _difficulty: &U256)
fn block_pre_import(&self, _bytes: &Bytes, _hash: &H256, _difficulty: &U256)
fires when new block is about to be imported implementations should be light
fn transactions_received(&self, _txs: &[UnverifiedTransaction], _peer_id: usize)
fn transactions_received(&self, _txs: &[UnverifiedTransaction], _peer_id: usize)
fires when new transactions are received from a peer