From 339f7f04bc083298285613fd8a5a457ccbbc7c74 Mon Sep 17 00:00:00 2001 From: Mark Spanbroek Date: Thu, 1 Apr 2021 11:16:53 +0200 Subject: [PATCH] Fix warnings --- dagger/stores/blockstore.nim | 5 ++++- tests/dagger/bitswap/testbitswap.nim | 2 -- tests/dagger/testasyncheapqueue.nim | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/dagger/stores/blockstore.nim b/dagger/stores/blockstore.nim index baa3fd19..8e887439 100644 --- a/dagger/stores/blockstore.nim +++ b/dagger/stores/blockstore.nim @@ -7,7 +7,6 @@ ## This file may not be copied, modified, or distributed except according to ## those terms. -import std/sets import std/sequtils import chronos import ../blocktype @@ -51,6 +50,8 @@ proc triggerChange( for handler in s.changeHandlers[changeType]: handler(evt) +{.push locks:"unknown".} + method getBlocks*(b: BlockStore, cid: seq[Cid]): Future[seq[Block]] {.base.} = ## Get a block from the stores ## @@ -75,5 +76,7 @@ method delBlocks*(s: BlockStore, blocks: seq[Cid]) {.base.} = s.triggerChange(ChangeType.Removed, blocks) +{.pop.} + proc contains*(s: BlockStore, blk: Cid): bool = s.hasBlock(blk) diff --git a/tests/dagger/bitswap/testbitswap.nim b/tests/dagger/bitswap/testbitswap.nim index ae3a41b5..72709608 100644 --- a/tests/dagger/bitswap/testbitswap.nim +++ b/tests/dagger/bitswap/testbitswap.nim @@ -1,5 +1,3 @@ - -import std/sets import std/sequtils import std/algorithm diff --git a/tests/dagger/testasyncheapqueue.nim b/tests/dagger/testasyncheapqueue.nim index e5086191..9e2230e9 100644 --- a/tests/dagger/testasyncheapqueue.nim +++ b/tests/dagger/testasyncheapqueue.nim @@ -145,7 +145,7 @@ suite "asynchronous tests": for item in data: await push(heap, item) - asyncCheck pushTask() + asyncSpawn pushTask() check heap.len == 5 check heap[0] == 1 # because we haven't pushed 0 yet