[marketplace] inline function _notEqual
This commit is contained in:
parent
e496ac3550
commit
bb0302afcb
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue