proofEnd returns end or past timestamp

This commit is contained in:
Eric Mastro 2022-09-20 15:56:27 +10:00 committed by Eric Mastro
parent 716b864f02
commit fdc0e7d58a
1 changed files with 3 additions and 2 deletions

View File

@ -182,10 +182,11 @@ contract Marketplace is Collateral, Proofs {
} }
function proofEnd(bytes32 slotId) public view returns (uint256) { function proofEnd(bytes32 slotId) public view returns (uint256) {
uint256 end = _end(slotId);
if (!_slotAcceptsProofs(slotId)) { if (!_slotAcceptsProofs(slotId)) {
return block.timestamp - 1; return end < block.timestamp ? end : block.timestamp - 1;
} }
return _end(slotId); return end;
} }
function _price( function _price(