From 10d64561de45d8674da51c58a773b7234183eb25 Mon Sep 17 00:00:00 2001 From: benbierens Date: Sat, 14 Oct 2023 15:40:55 +0200 Subject: [PATCH] Links the network store getTree to the local store. --- codex/stores/networkstore.nim | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/codex/stores/networkstore.nim b/codex/stores/networkstore.nim index bf796a77..d27350be 100644 --- a/codex/stores/networkstore.nim +++ b/codex/stores/networkstore.nim @@ -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)