pub trait NetworkBlock<BlockHash, BlockNumber> {
    fn announce_block(&self, hash: BlockHash, data: Option<Vec<u8>>);
    fn new_best_block_imported(&self, hash: BlockHash, number: BlockNumber);
}
Expand description

Provides ability to announce blocks to the network.

Required Methods§

Make sure an important block is propagated to peers.

In chain-based consensus, we often need to make sure non-best forks are at least temporarily synced. This function forces such an announcement.

Inform the network service about new best imported block.

Implementations on Foreign Types§

Implementors§