From 48e7d809dc4282b840078961d98edf458d5bf279 Mon Sep 17 00:00:00 2001 From: Dmitriy Ryajov Date: Tue, 16 Jan 2024 20:30:44 -0600 Subject: [PATCH] forwar getCidAndProof to local store --- codex/stores/blockstore.nim | 2 +- codex/stores/networkstore.nim | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/codex/stores/blockstore.nim b/codex/stores/blockstore.nim index fbe36152..d97d6948 100644 --- a/codex/stores/blockstore.nim +++ b/codex/stores/blockstore.nim @@ -89,7 +89,7 @@ method getCidAndProof*( ## Get a block proof from the blockstore ## - raiseAssert("putCidAndProof not implemented!") + raiseAssert("getCidAndProof not implemented!") method ensureExpiry*( self: BlockStore, diff --git a/codex/stores/networkstore.nim b/codex/stores/networkstore.nim index 24f4249d..59e4bb94 100644 --- a/codex/stores/networkstore.nim +++ b/codex/stores/networkstore.nim @@ -86,6 +86,15 @@ method putCidAndProof*( proof: CodexProof): Future[?!void] = self.localStore.putCidAndProof(treeCid, index, blockCid, proof) +method getCidAndProof*( + self: NetworkStore, + treeCid: Cid, + index: Natural): Future[?!(Cid, CodexProof)] = + ## Get a block proof from the blockstore + ## + + self.localStore.getCidAndProof(treeCid, index) + method ensureExpiry*( self: NetworkStore, cid: Cid,