mirror of
https://github.com/status-im/dagger-contracts.git
synced 2025-01-27 06:45:53 +00:00
[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:
parent
9b8bcc0bc7
commit
ac98689892
@ -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));
|
||||
}
|
||||
|
@ -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)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user