mirror of
https://github.com/logos-storage/logos-storage-nim.git
synced 2026-01-08 08:23:07 +00:00
abort download if atleast one block failed
This commit is contained in:
parent
15ef6c78eb
commit
c945d2b382
@ -72,8 +72,8 @@ proc streamBlocks*(
|
|||||||
# since disk IO is blocking
|
# since disk IO is blocking
|
||||||
for c in blockManifest:
|
for c in blockManifest:
|
||||||
without blk =? (await node.blockStore.getBlock(c)):
|
without blk =? (await node.blockStore.getBlock(c)):
|
||||||
trace "Couldn't retrieve block", cid = c
|
warn "Couldn't retrieve block", cid = c
|
||||||
continue
|
break # abort if we couldn't get a block
|
||||||
|
|
||||||
trace "Streaming block data", cid = blk.cid, bytes = blk.data.len
|
trace "Streaming block data", cid = blk.cid, bytes = blk.data.len
|
||||||
await stream.pushData(blk.data)
|
await stream.pushData(blk.data)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user