Session speed estimator

This commit is contained in:
Igor Katson 2024-08-21 11:57:45 +01:00
parent 0fdf6ad429
commit 06e88c138f
No known key found for this signature in database
GPG key ID: B4EC22B66D61A3F5
3 changed files with 60 additions and 8 deletions

View file

@ -79,6 +79,7 @@ fn compute_chunk_have_status(lengths: &Lengths, have_pieces: &BS) -> anyhow::Res
lengths.total_pieces()
);
}
let required_size = lengths.chunk_bitfield_bytes();
let vec = vec![0u8; required_size];
let mut chunk_bf = BF::from_boxed_slice(vec.into_boxed_slice());