diff --git a/contracts/Marketplace.sol b/contracts/Marketplace.sol index bba7156..00f0f3f 100644 --- a/contracts/Marketplace.sol +++ b/contracts/Marketplace.sol @@ -365,14 +365,6 @@ contract Marketplace is Collateral, Proofs, StateRetrieval { return s == RequestState.New || s == RequestState.Started; } - enum RequestState { - New, // [default] waiting to fill slots - Started, // all slots filled, accepting regular proofs - Cancelled, // not enough slots filled before expiry - Finished, // successfully completed - Failed // too many nodes have failed to provide proofs, data lost - } - struct RequestContext { uint256 slotsFilled; RequestState state; diff --git a/contracts/Requests.sol b/contracts/Requests.sol index bc9df6e..a648bdf 100644 --- a/contracts/Requests.sol +++ b/contracts/Requests.sol @@ -37,6 +37,14 @@ struct PoR { bytes name; // random name } +enum RequestState { + New, // [default] waiting to fill slots + Started, // all slots filled, accepting regular proofs + Cancelled, // not enough slots filled before expiry + Finished, // successfully completed + Failed // too many nodes have failed to provide proofs, data lost +} + library Requests { function id(Request memory request) internal pure returns (RequestId) { return RequestId.wrap(keccak256(abi.encode(request)));