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])