[JBT-122] Track piece request to peer
Sometimes blocks are "pending" even though they are not requested to any of the peer still connected. With the current model the block knows it's requested but doesn't know by whom and thus we need to reset the state in order to resolve the stalemate. By tracking the peer as well the processing can be smarter about when blocks need to be re-requested and when blocks could be cancelled or even have requested from multiple peers near the end game of the torrent.
Issue metadata
- Issue type: Improvement
- Priority: Medium
- Fix versions: 0.8.0
Edited by Johan