This commit is contained in:
Igor Katson 2024-03-29 20:15:25 +00:00
parent 8e77f20a5a
commit 2ef5124a2d
No known key found for this signature in database
GPG key ID: B4EC22B66D61A3F5
2 changed files with 7 additions and 0 deletions

View file

@ -105,6 +105,7 @@ async fn test_e2e() {
}
Ok(true)
}
crate::ManagedTorrentState::Error(e) => bail!("error: {e:?}"),
_ => bail!("broken state"),
})
.unwrap();

View file

@ -25,9 +25,15 @@ pub struct PieceInfo {
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub struct ChunkInfo {
pub piece_index: ValidPieceIndex,
// Index of chunk within the piece.
pub chunk_index: u32,
// Absolute chunk index if the first chunk of the first piece was 0.
pub absolute_index: u32,
pub size: u32,
// Offset of chunk in bytes within the piece.
pub offset: u32,
}