[node] Fix: ensure that retrieve works for small files
This commit is contained in:
parent
f14eeb688b
commit
94f6838d19
|
@ -132,7 +132,7 @@ proc retrieve*(
|
||||||
##
|
##
|
||||||
try:
|
try:
|
||||||
let
|
let
|
||||||
batch = manifest.blocks.len div PrefetchBatch
|
batch = max(1, manifest.blocks.len div PrefetchBatch)
|
||||||
trace "Prefetching in batches of", batch
|
trace "Prefetching in batches of", batch
|
||||||
for blks in manifest.blocks.distribute(batch, true):
|
for blks in manifest.blocks.distribute(batch, true):
|
||||||
discard await allFinished(
|
discard await allFinished(
|
||||||
|
|
Loading…
Reference in New Issue