vimpunk / cratetorrent

A BitTorrent V1 engine library for Rust (and currently Linux)
473 stars 35 forks source link

Constant Assertion Error #108

Closed TBye101 closed 2 years ago

TBye101 commented 2 years ago

thread 'main' panicked at 'assertion failed: matches!(self.blocks [block.index_in_piece()], BlockStatus :: Requested)', /home/username/.cargo/git/checkouts/cratetorrent-25088b08ab150db1/34aa138/cratetorrent/src/download.rs:127:9

Looks to me like this is being triggered whenever a received block hash doesn't match up correctly or something? Not sure if asserting and causing a panic on every invalid block is the correct solution here.

TBye101 commented 2 years ago

Never mind, I should read the source before I complain. Only a debug assertion!