Skip to content

Commit

Permalink
Links the network store getTree to the local store.
Browse files Browse the repository at this point in the history
  • Loading branch information
benbierens authored and tbekas committed Oct 17, 2023
1 parent 8c1d97d commit 10d6456
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions codex/stores/networkstore.nim
Original file line number Diff line number Diff line change
Expand Up @@ -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
##
Expand All @@ -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)

0 comments on commit 10d6456

Please sign in to comment.