Trait client_traits::ChainNotify[][src]

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
    ) { ... } }

Represents what has to be handled by actor listening to chain events

Provided methods

fn new_blocks(&self, _new_blocks: NewBlocks)[src]

fires when chain has new blocks.

fn start(&self)[src]

fires when chain achieves active mode

fn stop(&self)[src]

fires when chain achieves passive mode

fn broadcast(&self, _message_type: ChainMessageType)[src]

fires when chain broadcasts a message

fn block_pre_import(&self, _bytes: &Bytes, _hash: &H256, _difficulty: &U256)[src]

fires when new block is about to be imported implementations should be light

fn transactions_received(&self, _txs: &[UnverifiedTransaction], _peer_id: usize)[src]

fires when new transactions are received from a peer

Loading content...

Implementors

Loading content...