add exception annotations, fix unawaited Future, fix imports
This commit is contained in:
parent
e3863a15d7
commit
c3d146f45a
|
@ -429,7 +429,7 @@ asyncchecksuite "NetworkStore engine handlers":
|
|||
let
|
||||
tCid = Cid.example
|
||||
delivery = BlockDelivery(blk: Block.example, address: BlockAddress(leaf: true, treeCid: tCid))
|
||||
|
||||
|
||||
await engine.resolveBlocks(@[delivery])
|
||||
|
||||
check:
|
||||
|
@ -442,7 +442,7 @@ asyncchecksuite "NetworkStore engine handlers":
|
|||
let
|
||||
blkCid = Cid.example
|
||||
delivery = BlockDelivery(blk: Block.example, address: BlockAddress(leaf: false, cid: blkCid))
|
||||
|
||||
|
||||
await engine.resolveBlocks(@[delivery])
|
||||
|
||||
check:
|
||||
|
@ -553,7 +553,7 @@ asyncchecksuite "Task Handler":
|
|||
test "Should set in-flight for outgoing blocks":
|
||||
proc sendBlocksDelivery(
|
||||
id: PeerId,
|
||||
blocksDelivery: seq[BlockDelivery]) {.gcsafe, async.} =
|
||||
blocksDelivery: seq[BlockDelivery]) {.gcsafe, async: (handleException: true).} =
|
||||
check peersCtx[0].peerWants[0].inFlight
|
||||
|
||||
for blk in blocks:
|
||||
|
|
|
@ -256,7 +256,7 @@ ethersuite "On-Chain Market":
|
|||
receivedIds.add(requestId)
|
||||
|
||||
let subscription = await market.subscribeRequestCancelled(request.id, onRequestCancelled)
|
||||
advanceToCancelledRequest(otherRequest) # shares expiry with otherRequest
|
||||
await advanceToCancelledRequest(otherRequest) # shares expiry with otherRequest
|
||||
await market.withdrawFunds(otherRequest.id)
|
||||
check receivedIds.len == 0
|
||||
await market.withdrawFunds(request.id)
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import pkg/ethers
|
||||
import pkg/serde
|
||||
|
||||
proc currentTime*(provider: Provider): Future[UInt256] {.async.} =
|
||||
return (!await provider.getBlock(BlockTag.pending)).timestamp
|
||||
|
|
Loading…
Reference in New Issue