mirror of
https://github.com/logos-storage/logos-storage-nim.git
synced 2026-01-11 18:03:09 +00:00
do not randomize piece fetching sequence for now
This commit is contained in:
parent
526e3f1f69
commit
ee2f403e52
@ -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
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user