[node] Fix: ensure that retrieve works for small files

This commit is contained in:
Mark Spanbroek 2022-07-06 15:35:57 +02:00 committed by markspanbroek
parent f14eeb688b
commit 94f6838d19
1 changed files with 1 additions and 1 deletions

View File

@ -132,7 +132,7 @@ proc retrieve*(
##
try:
let
batch = manifest.blocks.len div PrefetchBatch
batch = max(1, manifest.blocks.len div PrefetchBatch)
trace "Prefetching in batches of", batch
for blks in manifest.blocks.distribute(batch, true):
discard await allFinished(