sc_network::service::traits

Trait NetworkSyncForkRequest

Source
pub trait NetworkSyncForkRequest<BlockHash, BlockNumber> {
    // Required method
    fn set_sync_fork_request(
        &self,
        peers: Vec<PeerId>,
        hash: BlockHash,
        number: BlockNumber,
    );
}
Expand description

Provides an ability to set a fork sync request for a particular block.

Required Methods§

Source

fn set_sync_fork_request( &self, peers: Vec<PeerId>, hash: BlockHash, number: BlockNumber, )

Notifies the sync service to try and sync the given block from the given peers.

If the given vector of peers is empty then the underlying implementation should make a best effort to fetch the block from any peers it is connected to (NOTE: this assumption will change in the future #3629).

Implementations on Foreign Types§

Source§

impl<T, BlockHash, BlockNumber> NetworkSyncForkRequest<BlockHash, BlockNumber> for Arc<T>
where T: ?Sized + NetworkSyncForkRequest<BlockHash, BlockNumber>,

Source§

fn set_sync_fork_request( &self, peers: Vec<PeerId>, hash: BlockHash, number: BlockNumber, )

Implementors§