mirror of
https://github.com/codex-storage/nim-codex.git
synced 2025-01-18 08:51:43 +00:00
[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…
x
Reference in New Issue
Block a user