[marketplace] inline function _notEqual

This commit is contained in:
Mark Spanbroek 2023-01-16 14:21:20 +01:00 committed by markspanbroek
parent e496ac3550
commit bb0302afcb
1 changed files with 1 additions and 5 deletions

View File

@ -235,7 +235,7 @@ contract Marketplace is Collateral, Proofs, StateRetrieval {
SlotId slotId
) internal view returns (RequestId) {
Slot memory slot = _slot(slotId);
require(_notEqual(slot.requestId, 0), "Missing request id");
require(RequestId.unwrap(slot.requestId) != 0, "Missing request id");
return slot.requestId;
}
@ -365,10 +365,6 @@ contract Marketplace is Collateral, Proofs, StateRetrieval {
return s == RequestState.New || s == RequestState.Started;
}
function _notEqual(RequestId a, uint256 b) internal pure returns (bool) {
return RequestId.unwrap(a) != bytes32(b);
}
enum RequestState {
New, // [default] waiting to fill slots
Started, // all slots filled, accepting regular proofs