Fix warnings

This commit is contained in:
Mark Spanbroek 2021-04-01 11:16:53 +02:00 committed by markspanbroek
parent 5bb87c4ecc
commit 339f7f04bc
3 changed files with 5 additions and 4 deletions

View File

@ -7,7 +7,6 @@
## This file may not be copied, modified, or distributed except according to ## This file may not be copied, modified, or distributed except according to
## those terms. ## those terms.
import std/sets
import std/sequtils import std/sequtils
import chronos import chronos
import ../blocktype import ../blocktype
@ -51,6 +50,8 @@ proc triggerChange(
for handler in s.changeHandlers[changeType]: for handler in s.changeHandlers[changeType]:
handler(evt) handler(evt)
{.push locks:"unknown".}
method getBlocks*(b: BlockStore, cid: seq[Cid]): Future[seq[Block]] {.base.} = method getBlocks*(b: BlockStore, cid: seq[Cid]): Future[seq[Block]] {.base.} =
## Get a block from the stores ## Get a block from the stores
## ##
@ -75,5 +76,7 @@ method delBlocks*(s: BlockStore, blocks: seq[Cid]) {.base.} =
s.triggerChange(ChangeType.Removed, blocks) s.triggerChange(ChangeType.Removed, blocks)
{.pop.}
proc contains*(s: BlockStore, blk: Cid): bool = proc contains*(s: BlockStore, blk: Cid): bool =
s.hasBlock(blk) s.hasBlock(blk)

View File

@ -1,5 +1,3 @@
import std/sets
import std/sequtils import std/sequtils
import std/algorithm import std/algorithm

View File

@ -145,7 +145,7 @@ suite "asynchronous tests":
for item in data: for item in data:
await push(heap, item) await push(heap, item)
asyncCheck pushTask() asyncSpawn pushTask()
check heap.len == 5 check heap.len == 5
check heap[0] == 1 # because we haven't pushed 0 yet check heap[0] == 1 # because we haven't pushed 0 yet