DEBUG: final version
This commit is contained in:
parent
397bf91f27
commit
09a090d129
|
@ -55,8 +55,8 @@ method getBlock*(
|
||||||
trace "Empty block, ignoring"
|
trace "Empty block, ignoring"
|
||||||
return cid.emptyBlock.success
|
return cid.emptyBlock.success
|
||||||
|
|
||||||
if cid notin self.cache:
|
# if cid notin self.cache:
|
||||||
return Block.failure("Block not found") # TODO: return nil
|
# return Block.failure("Block not found") # TODO: return nil
|
||||||
|
|
||||||
return self.cache[cid].catch()
|
return self.cache[cid].catch()
|
||||||
|
|
||||||
|
|
|
@ -81,7 +81,7 @@ suite "Cache Store tests":
|
||||||
|
|
||||||
check:
|
check:
|
||||||
blk.isErr
|
blk.isErr
|
||||||
#blk.error of system.KeyError
|
blk.error of system.KeyError
|
||||||
|
|
||||||
test "hasBlock":
|
test "hasBlock":
|
||||||
let store = CacheStore.new(@[newBlock])
|
let store = CacheStore.new(@[newBlock])
|
||||||
|
|
Loading…
Reference in New Issue