Merge pull request #106 from ikatson/resilience-to-bogus-peers
Fix resilience to bogus peers
This commit is contained in:
commit
bb0f3c36ec
6 changed files with 38 additions and 8 deletions
|
|
@ -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,
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue