diff --git a/contracts/Storage.sol b/contracts/Storage.sol index b1aed99..28eb0d6 100644 --- a/contracts/Storage.sol +++ b/contracts/Storage.sol @@ -35,10 +35,6 @@ contract Storage is Marketplace { minCollateralThreshold = _minCollateralThreshold; } - function getSlot(SlotId slotId) public view returns (Slot memory) { - return _slot(slotId); - } - function missingProofs(SlotId slotId) public view returns (uint256) { return _missed(_toProofId(slotId)); } diff --git a/test/Storage.test.js b/test/Storage.test.js index fdadfc0..aeb6748 100644 --- a/test/Storage.test.js +++ b/test/Storage.test.js @@ -2,6 +2,7 @@ const { expect } = require("chai") const { ethers, deployments } = require("hardhat") const { BigNumber } = ethers const { hexlify, randomBytes } = ethers.utils +const { AddressZero } = ethers.constants const { exampleRequest } = require("./examples") const { advanceTime, advanceTimeTo, currentTime, mine } = require("./evm") const { requestId, slotId } = require("./ids") @@ -120,7 +121,7 @@ describe("Storage", function () { await expect( await storage.markProofAsMissing(id, missedPeriod) ).to.emit(storage, "SlotFreed") - await expect(storage.getSlot(id)).to.be.revertedWith("Slot empty") + expect(await storage.getHost(id)).to.equal(AddressZero) } else { await storage.markProofAsMissing(id, missedPeriod) }