do not randomize piece fetching sequence for now

This commit is contained in:
Marcin Czenko 2025-03-26 00:28:32 +01:00
parent 526e3f1f69
commit ee2f403e52
No known key found for this signature in database
GPG Key ID: 33DEA0C8E30937C0

View File

@ -73,11 +73,11 @@ proc newTorrentDownloader*(
let queue = newAsyncQueue[TorrentPiece](maxsize = numOfPieces)
# optional: randomize the order of pieces
# not sure if this is such a great idea when streaming content
let iter = Iter.new(0 ..< numOfPieces)
var pieceDownloadSequence = newSeqWith(numOfPieces, iter.next())
Rng.instance.shuffle(pieceDownloadSequence)
# optional: randomize the order of pieces
# not sure if this is such a great idea when streaming content
# Rng.instance.shuffle(pieceDownloadSequence)
trace "Piece download sequence", pieceDownloadSequence