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

fires when chain has new blocks.

fires when chain achieves active mode

fires when chain achieves passive mode

fires when chain broadcasts a message

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

fires when new transactions are received from a peer

Implementors