[marketplace] Remove duplication

This commit is contained in:
Mark Spanbroek 2022-10-26 10:48:09 +02:00
parent 61b8f5fc35
commit c29fb75a48
1 changed files with 1 additions and 7 deletions

View File

@ -267,13 +267,7 @@ contract Marketplace is Collateral, Proofs {
} }
function proofEnd(SlotId slotId) public view returns (uint256) { function proofEnd(SlotId slotId) public view returns (uint256) {
Slot memory slot = _slot(slotId); return requestEnd(_slot(slotId).requestId);
uint256 end = _end(_toEndId(slot.requestId));
if (_slotAcceptsProofs(slotId)) {
return end;
} else {
return Math.min(end, block.timestamp - 1);
}
} }
function requestEnd(RequestId requestId) public view returns (uint256) { function requestEnd(RequestId requestId) public view returns (uint256) {