pub trait PieceValidator: Sync + Send {
    // Required method
    fn validate_piece<'life0, 'async_trait>(
        &'life0 self,
        source_peer_id: PeerId,
        piece_index: PieceIndex,
        piece: Piece,
    ) -> Pin<Box<dyn Future<Output = Option<Piece>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Validates piece against using its commitment.

Required Methods§

source

fn validate_piece<'life0, 'async_trait>( &'life0 self, source_peer_id: PeerId, piece_index: PieceIndex, piece: Piece, ) -> Pin<Box<dyn Future<Output = Option<Piece>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Validates piece against using its commitment.

Implementors§