mirror of
https://github.com/logos-storage/logos-storage-contracts-eth.git
synced 2026-01-09 08:43:08 +00:00
marketplace: no longer expose forciblyFreeSlot in tests
reason: freeSlot() will call forciblyFreeSlot when contract is not finished, so we can use that instead
This commit is contained in:
parent
47f3c1e36d
commit
2cd45214cf
@ -14,10 +14,6 @@ contract TestMarketplace is Marketplace {
|
||||
IGroth16Verifier verifier
|
||||
) Marketplace(config, vault, verifier) {}
|
||||
|
||||
function forciblyFreeSlot(SlotId slotId) public {
|
||||
_forciblyFreeSlot(slotId);
|
||||
}
|
||||
|
||||
function getSlotBalance(SlotId slotId) public view returns (uint256) {
|
||||
Slot storage slot = _slots[slotId];
|
||||
FundId fund = slot.requestId.asFundId();
|
||||
|
||||
@ -954,7 +954,7 @@ describe("Marketplace", function () {
|
||||
for (let i = 0; i <= request.ask.maxSlotLoss; i++) {
|
||||
slot.index = i
|
||||
let id = slotId(slot)
|
||||
await marketplace.forciblyFreeSlot(id)
|
||||
await marketplace.freeSlot(id)
|
||||
}
|
||||
expect(await marketplace.requestState(slot.request)).to.equal(New)
|
||||
})
|
||||
|
||||
@ -50,7 +50,7 @@ async function waitUntilFailed(contract, request) {
|
||||
for (let i = 0; i <= request.ask.maxSlotLoss; i++) {
|
||||
slot.index = i
|
||||
let id = slotId(slot)
|
||||
await contract.forciblyFreeSlot(id)
|
||||
await contract.freeSlot(id)
|
||||
}
|
||||
}
|
||||
|
||||
@ -59,7 +59,7 @@ async function waitUntilSlotFailed(contract, request, slot) {
|
||||
let freed = 0
|
||||
while (freed <= request.ask.maxSlotLoss) {
|
||||
if (index !== slot.index) {
|
||||
await contract.forciblyFreeSlot(slotId({ ...slot, index }))
|
||||
await contract.freeSlot(slotId({ ...slot, index }))
|
||||
freed++
|
||||
}
|
||||
index++
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user