Works fine now finally
This commit is contained in:
parent
7e180c05b3
commit
f0788f2c4a
4 changed files with 121 additions and 35 deletions
|
|
@ -194,6 +194,14 @@ impl ChunkTracker {
|
|||
.filter_map(|id| self.lengths.validate_piece_index(id))
|
||||
}
|
||||
|
||||
pub(crate) fn is_piece_queued(&self, id: ValidPieceIndex) -> bool {
|
||||
self.queue_pieces[id.get() as usize]
|
||||
}
|
||||
|
||||
pub(crate) fn is_piece_have(&self, id: ValidPieceIndex) -> bool {
|
||||
self.have[id.get() as usize]
|
||||
}
|
||||
|
||||
// None if wrong chunk
|
||||
// true if did something
|
||||
// false if didn't do anything
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue