DEBUG: check CacheStore.getBlock with catch

This commit is contained in:
Bulat Ziganshin 2022-06-30 15:52:31 +03:00
parent 5fd449e865
commit 08bb9a8454

View File

@ -58,7 +58,7 @@ method getBlock*(
if cid notin self.cache:
return Block.failure("Block not found") # TODO: return nil
return self.cache[cid]
return self.cache[cid].catch()
method hasBlock*(self: CacheStore, cid: Cid): Future[?!bool] {.async.} =
## Check if the block exists in the blockstore