mirror of
https://github.com/status-im/codex-contracts-eth.git
synced 2025-01-31 10:46:53 +00:00
[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;
|
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 {
|
struct RequestContext {
|
||||||
uint256 slotsFilled;
|
uint256 slotsFilled;
|
||||||
RequestState state;
|
RequestState state;
|
||||||
|
@ -37,6 +37,14 @@ struct PoR {
|
|||||||
bytes name; // random name
|
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 {
|
library Requests {
|
||||||
function id(Request memory request) internal pure returns (RequestId) {
|
function id(Request memory request) internal pure returns (RequestId) {
|
||||||
return RequestId.wrap(keccak256(abi.encode(request)));
|
return RequestId.wrap(keccak256(abi.encode(request)));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user