From 6869475283de8189712c96be7ccef8ec79e04986 Mon Sep 17 00:00:00 2001 From: gmega Date: Tue, 6 Feb 2024 16:08:48 -0300 Subject: [PATCH] add getCid trace statement, fix compilation (even if I don't understand what broke) --- codex/stores/repostore.nim | 3 +++ tests/codex/utils/asyncprofiler/testmetricscollector.nim | 1 - tests/codex/utils/asyncprofiler/testserialization.nim | 4 +--- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/codex/stores/repostore.nim b/codex/stores/repostore.nim index ef9d322c..9e2bc9a1 100644 --- a/codex/stores/repostore.nim +++ b/codex/stores/repostore.nim @@ -203,6 +203,9 @@ 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] = diff --git a/tests/codex/utils/asyncprofiler/testmetricscollector.nim b/tests/codex/utils/asyncprofiler/testmetricscollector.nim index 9b5572cc..7f6c7434 100644 --- a/tests/codex/utils/asyncprofiler/testmetricscollector.nim +++ b/tests/codex/utils/asyncprofiler/testmetricscollector.nim @@ -5,7 +5,6 @@ import pkg/chronos/profiler import pkg/metrics import codex/utils/asyncprofiler/metricscollector -import ../../helpers suite "asyncprofiler metrics collector": diff --git a/tests/codex/utils/asyncprofiler/testserialization.nim b/tests/codex/utils/asyncprofiler/testserialization.nim index 607e1dd8..30b5d0fb 100644 --- a/tests/codex/utils/asyncprofiler/testserialization.nim +++ b/tests/codex/utils/asyncprofiler/testserialization.nim @@ -7,9 +7,7 @@ import chronos/profiler import codex/utils/asyncprofiler/serialization -import ../../helpers - -checksuite "asyncprofiler metrics serializer": +suite "asyncprofiler metrics serializer": let fooLoc = SrcLoc( procedure: "foo",