From 6e0dfdf7dbaa3700e20fc4be25545f8ece114541 Mon Sep 17 00:00:00 2001 From: Mark Spanbroek Date: Wed, 23 Nov 2022 15:10:58 +0100 Subject: [PATCH] [marketplace] Rename _freeSlot() -> _forciblyFreeSlot() --- contracts/Marketplace.sol | 2 +- contracts/Storage.sol | 2 +- contracts/TestMarketplace.sol | 4 ++-- test/marketplace.js | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/contracts/Marketplace.sol b/contracts/Marketplace.sol index dd4a7d5..30ca7d3 100644 --- a/contracts/Marketplace.sol +++ b/contracts/Marketplace.sol @@ -118,7 +118,7 @@ contract Marketplace is Collateral, Proofs { } } - function _freeSlot(SlotId slotId) + function _forciblyFreeSlot(SlotId slotId) internal slotMustAcceptProofs(slotId) marketplaceInvariant diff --git a/contracts/Storage.sol b/contracts/Storage.sol index ed65fea..97098bd 100644 --- a/contracts/Storage.sol +++ b/contracts/Storage.sol @@ -94,7 +94,7 @@ contract Storage is Collateral, Marketplace { // When the collateral drops below the minimum threshold, the slot // needs to be freed so that there is enough remaining collateral to be // distributed for repairs and rewards (with any leftover to be burnt). - _freeSlot(slotId); + _forciblyFreeSlot(slotId); } } } diff --git a/contracts/TestMarketplace.sol b/contracts/TestMarketplace.sol index 3611db3..0e7c831 100644 --- a/contracts/TestMarketplace.sol +++ b/contracts/TestMarketplace.sol @@ -26,8 +26,8 @@ contract TestMarketplace is Marketplace { return _isSlotCancelled(slotId); } - function freeSlot(SlotId slotId) public { - _freeSlot(slotId); + function forciblyFreeSlot(SlotId slotId) public { + _forciblyFreeSlot(slotId); } function slot(SlotId slotId) public view returns (Slot memory) { diff --git a/test/marketplace.js b/test/marketplace.js index cdfbff9..f5069a1 100644 --- a/test/marketplace.js +++ b/test/marketplace.js @@ -20,7 +20,7 @@ async function waitUntilFailed(contract, request, slot) { for (let i = 0; i <= request.ask.maxSlotLoss; i++) { slot.index = i let id = slotId(slot) - await contract.freeSlot(id) + await contract.forciblyFreeSlot(id) } }