From c945d2b3823cdade504b2d2eb5c8c30dff161efb Mon Sep 17 00:00:00 2001 From: Dmitriy Ryajov Date: Wed, 12 Jan 2022 11:28:46 -0600 Subject: [PATCH] abort download if atleast one block failed --- dagger/node.nim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dagger/node.nim b/dagger/node.nim index de397e11..f41051a4 100644 --- a/dagger/node.nim +++ b/dagger/node.nim @@ -72,8 +72,8 @@ proc streamBlocks*( # since disk IO is blocking for c in blockManifest: without blk =? (await node.blockStore.getBlock(c)): - trace "Couldn't retrieve block", cid = c - continue + warn "Couldn't retrieve block", cid = c + break # abort if we couldn't get a block trace "Streaming block data", cid = blk.cid, bytes = blk.data.len await stream.pushData(blk.data)