[Storage] Remove getSlot()

Rationale: Slot is struct that is used by the contract
to keep track of the state of a slot, it doesn't need
to be exposed on the API
This commit is contained in:
Mark Spanbroek 2023-01-09 13:46:03 +01:00 committed by markspanbroek
parent 9b8bcc0bc7
commit ac98689892
2 changed files with 2 additions and 5 deletions

View File

@ -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));
}

View File

@ -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)
}