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,