mirror of
https://github.com/codex-storage/nim-codex.git
synced 2025-01-31 15:16:12 +00:00
move traces into getCid and getCidAndProof
This commit is contained in:
parent
6869475283
commit
833172268a
@ -142,7 +142,9 @@ method getCidAndProof*(
|
||||
trace "Unable to decode cid and proof", err = err.msg
|
||||
return failure(err)
|
||||
|
||||
trace "Got cid and proof for block", cid, proof = $proof
|
||||
trace "Got cid and proof for block", treeCid=treeCid, index=index,
|
||||
cid, proof = $proof
|
||||
|
||||
return success (cid, proof)
|
||||
|
||||
method getCid*(
|
||||
@ -160,6 +162,9 @@ method getCid*(
|
||||
trace "Error getting cid from datastore", err = err.msg, key
|
||||
return failure(err)
|
||||
|
||||
trace "Got cid for block", treeCid=treeCid, index=index,
|
||||
cid, proof = $proof
|
||||
|
||||
return (Cid, CodexProof).decodeCid(value)
|
||||
|
||||
method getBlock*(self: RepoStore, cid: Cid): Future[?!Block] {.async.} =
|
||||
@ -203,9 +208,6 @@ method getBlock*(self: RepoStore, treeCid: Cid, index: Natural): Future[?!Block]
|
||||
without cid =? await self.getCid(treeCid, index), err:
|
||||
return failure(err)
|
||||
|
||||
trace "Mapped tree cid and index into block cid", treeCid=treeCid,
|
||||
index=index, cid=cid
|
||||
|
||||
await self.getBlock(cid)
|
||||
|
||||
method getBlock*(self: RepoStore, address: BlockAddress): Future[?!Block] =
|
||||
|
Loading…
x
Reference in New Issue
Block a user