mirror of
https://github.com/logos-storage/logos-storage-contracts-eth.git
synced 2026-01-03 22:03:08 +00:00
marketplace: add test for hosts that makes request fail
Co-Authored-By: Adam Uhlíř <adam@uhlir.dev>
This commit is contained in:
parent
cd8b6572f3
commit
4410941061
@ -711,6 +711,18 @@ describe("Marketplace", function () {
|
||||
)
|
||||
})
|
||||
|
||||
it("does not pay host that made the request fail", async function () {
|
||||
await waitUntilStarted(marketplace, request, proof, token)
|
||||
for (let i = 0; i <= request.ask.maxSlotLoss; i++) {
|
||||
slot.index = i
|
||||
await marketplace.freeSlot(slotId(slot))
|
||||
}
|
||||
await waitUntilFinished(marketplace, requestId(request))
|
||||
await expect(marketplace.freeSlot(slotId(slot))).to.be.revertedWith(
|
||||
"Marketplace_InvalidSlotHost"
|
||||
)
|
||||
})
|
||||
|
||||
it("pays only once", async function () {
|
||||
await waitUntilStarted(marketplace, request, proof, token)
|
||||
await waitUntilFinished(marketplace, requestId(request))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user