diff --git a/codex/node.nim b/codex/node.nim index 8ae3a1c9..8f23bf47 100644 --- a/codex/node.nim +++ b/codex/node.nim @@ -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(