Skip to content

Commit b3994bc

Browse files
committed
contracts: fix flaky test
1 parent 2ea00a7 commit b3994bc

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/contracts/testMarket.nim

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -541,14 +541,14 @@ ethersuite "On-Chain Market":
541541
(await market.queryPastStorageRequestedEvents(blocksAgo = 2))
542542
)
543543

544-
test "pays rewards and collateral to host":
544+
test "pays rewards and returns collateral to host":
545545
await market.requestStorage(request)
546546

547547
let address = await host.getAddress()
548548
switchAccount(host)
549549
await market.reserveSlot(request.id, 0.uint64)
550550
await market.fillSlot(request.id, 0.uint64, proof, request.ask.collateralPerSlot)
551-
let filledAt = (await ethProvider.currentTime())
551+
let filledAt = await ethProvider.blockTime(BlockTag.latest)
552552

553553
for slotIndex in 1 ..< request.ask.slots:
554554
await market.reserveSlot(request.id, slotIndex.uint64)
@@ -629,7 +629,7 @@ ethersuite "On-Chain Market":
629629
check collateral ==
630630
request.ask.collateralPerSlot - (request.ask.collateralPerSlot * 10).div(100.u256)
631631

632-
test "the request is added in cache after the fist access":
632+
test "the request is added to cache after the first access":
633633
await market.requestStorage(request)
634634

635635
check market.requestCache.contains($request.id) == false

0 commit comments

Comments
 (0)