mirror of
https://github.com/logos-storage/logos-storage-nim.git
synced 2026-01-16 04:13:09 +00:00
14 lines
342 B
Nim
14 lines
342 B
Nim
import pkg/chronos
|
|
import pkg/libp2p
|
|
import pkg/questionable/results
|
|
import pkg/codex/stores/blockstore
|
|
|
|
type
|
|
MockBlockStore* = ref object of BlockStore
|
|
numberOfGetCalls*: int
|
|
getBlock*: Block
|
|
|
|
method getBlock*(self: MockBlockStore, cid: Cid): Future[?!Block] {.async.} =
|
|
inc self.numberOfGetCalls
|
|
return success(self.getBlock)
|