[marketplace] Move RequestState enum to Requests.sol
This commit is contained in:
parent
bb0302afcb
commit
10f88a62a7
|
@ -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;
|
||||
|
|
|
@ -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)));
|
||||
|
|
Loading…
Reference in New Issue