From 09a090d129925f451166a9a8d34b66970616b68f Mon Sep 17 00:00:00 2001 From: Bulat Ziganshin Date: Thu, 30 Jun 2022 21:00:10 +0300 Subject: [PATCH] DEBUG: final version --- codex/stores/cachestore.nim | 4 ++-- tests/codex/stores/testcachestore.nim | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/codex/stores/cachestore.nim b/codex/stores/cachestore.nim index 1236c7db..43317c31 100644 --- a/codex/stores/cachestore.nim +++ b/codex/stores/cachestore.nim @@ -55,8 +55,8 @@ method getBlock*( trace "Empty block, ignoring" return cid.emptyBlock.success - if cid notin self.cache: - return Block.failure("Block not found") # TODO: return nil + # if cid notin self.cache: + # return Block.failure("Block not found") # TODO: return nil return self.cache[cid].catch() diff --git a/tests/codex/stores/testcachestore.nim b/tests/codex/stores/testcachestore.nim index 4487553c..c59e1d7f 100644 --- a/tests/codex/stores/testcachestore.nim +++ b/tests/codex/stores/testcachestore.nim @@ -81,7 +81,7 @@ suite "Cache Store tests": check: blk.isErr - #blk.error of system.KeyError + blk.error of system.KeyError test "hasBlock": let store = CacheStore.new(@[newBlock])