From bb0302afcb590137f33a06a5378090433911e357 Mon Sep 17 00:00:00 2001 From: Mark Spanbroek Date: Mon, 16 Jan 2023 14:21:20 +0100 Subject: [PATCH] [marketplace] inline function _notEqual --- contracts/Marketplace.sol | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/contracts/Marketplace.sol b/contracts/Marketplace.sol index 0c31fb6..bba7156 100644 --- a/contracts/Marketplace.sol +++ b/contracts/Marketplace.sol @@ -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