mirror of
https://github.com/codex-storage/nim-codex.git
synced 2025-02-17 07:16:47 +00:00
Links the network store getTree to the local store.
This commit is contained in:
parent
8c1d97d75c
commit
10d64561de
@ -114,6 +114,9 @@ method hasBlock*(self: NetworkStore, cid: Cid): Future[?!bool] {.async.} =
|
|||||||
trace "Checking network store for block existence", cid
|
trace "Checking network store for block existence", cid
|
||||||
return await self.localStore.hasBlock(cid)
|
return await self.localStore.hasBlock(cid)
|
||||||
|
|
||||||
|
method getTree*(self: NetworkStore, treeCid: Cid): Future[?!MerkleTree] =
|
||||||
|
self.localStore.getTree(treeCid)
|
||||||
|
|
||||||
method close*(self: NetworkStore): Future[void] {.async.} =
|
method close*(self: NetworkStore): Future[void] {.async.} =
|
||||||
## Close the underlying local blockstore
|
## Close the underlying local blockstore
|
||||||
##
|
##
|
||||||
@ -126,8 +129,8 @@ proc new*(
|
|||||||
engine: BlockExcEngine,
|
engine: BlockExcEngine,
|
||||||
localStore: BlockStore
|
localStore: BlockStore
|
||||||
): NetworkStore =
|
): NetworkStore =
|
||||||
## Create new instance of a NetworkStore
|
## Create new instance of a NetworkStore
|
||||||
##
|
##
|
||||||
NetworkStore(
|
NetworkStore(
|
||||||
localStore: localStore,
|
localStore: localStore,
|
||||||
engine: engine)
|
engine: engine)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user