Skip to main content

validate_hash_request

Function validate_hash_request 

Source
pub fn validate_hash_request(
    req: &HashRequest,
    file_num_blocks: u32,
    _file_num_pieces: u32,
) -> bool
Expand description

Validate a hash request against file parameters.

Checks that the request is well-formed and within the file’s bounds. file_num_blocks is the total number of 16 KiB blocks in the file. file_num_pieces is the total number of pieces in the file.