mirror of
https://github.com/logos-storage/logos-storage-nim.git
synced 2026-01-14 11:23:10 +00:00
contracts: fix flaky test
This commit is contained in:
parent
d6f7fb325c
commit
0ed671b643
@ -541,14 +541,14 @@ ethersuite "On-Chain Market":
|
||||
(await market.queryPastStorageRequestedEvents(blocksAgo = 2))
|
||||
)
|
||||
|
||||
test "pays rewards and collateral to host":
|
||||
test "pays rewards and returns collateral to host":
|
||||
await market.requestStorage(request)
|
||||
|
||||
let address = await host.getAddress()
|
||||
switchAccount(host)
|
||||
await market.reserveSlot(request.id, 0.uint64)
|
||||
await market.fillSlot(request.id, 0.uint64, proof, request.ask.collateralPerSlot)
|
||||
let filledAt = (await ethProvider.currentTime())
|
||||
let filledAt = await ethProvider.blockTime(BlockTag.latest)
|
||||
|
||||
for slotIndex in 1 ..< request.ask.slots:
|
||||
await market.reserveSlot(request.id, slotIndex.uint64)
|
||||
@ -629,7 +629,7 @@ ethersuite "On-Chain Market":
|
||||
check collateral ==
|
||||
request.ask.collateralPerSlot - (request.ask.collateralPerSlot * 10).div(100.u256)
|
||||
|
||||
test "the request is added in cache after the fist access":
|
||||
test "the request is added to cache after the first access":
|
||||
await market.requestStorage(request)
|
||||
|
||||
check market.requestCache.contains($request.id) == false
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user