Links the network store getTree to the local store.

This commit is contained in:
benbierens 2023-10-14 15:40:55 +02:00 committed by Tomasz Bekas
parent 8c1d97d75c
commit 10d64561de
No known key found for this signature in database
GPG Key ID: 4854E04C98824959
1 changed files with 5 additions and 2 deletions

View File

@ -114,6 +114,9 @@ method hasBlock*(self: NetworkStore, cid: Cid): Future[?!bool] {.async.} =
trace "Checking network store for block existence", 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.} =
## Close the underlying local blockstore
##
@ -126,8 +129,8 @@ proc new*(
engine: BlockExcEngine,
localStore: BlockStore
): NetworkStore =
## Create new instance of a NetworkStore
##
## Create new instance of a NetworkStore
##
NetworkStore(
localStore: localStore,
engine: engine)