Skip to content

Commit 145db5a

Browse files
Merge pull request #304 from kleros/Deadline-Instead-Of-Timeout
[Feat] Input a deadline instead of a timeout
2 parents d3bea2b + 3da4582 commit 145db5a

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

contracts/standard/arbitration/Linguo.sol

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* @authors: [@unknownunknown1]
2+
* @authors: [@unknownunknown1*]
33
* @reviewers: [@ferittuncer*, @clesaege*, @satello*]
44
* @auditors: []
55
* @bounties: []
@@ -182,22 +182,22 @@ contract Linguo is Arbitrable {
182182
// **************************** //
183183

184184
/** @dev Creates a task based on provided details. Requires a value of maximal price to be deposited.
185-
* @param _submissionTimeout Time allotted for submitting a translation.
185+
* @param _deadline The deadline for the translation to be completed.
186186
* @param _minPrice A minimal price of the translation. In wei.
187187
* @param _metaEvidence A URI of meta-evidence object for task submission.
188188
* @return taskID The ID of the created task.
189189
*/
190190
function createTask(
191-
uint _submissionTimeout,
191+
uint _deadline,
192192
uint _minPrice,
193193
string _metaEvidence
194194
) external payable returns (uint taskID){
195195
require(msg.value >= _minPrice, "Deposited value should be greater than or equal to the min price.");
196-
require(_submissionTimeout > 0, "Submission timeout should not be 0.");
196+
require(_deadline > now, "The deadline should be in the future.");
197197

198198
taskID = tasks.length++;
199199
Task storage task = tasks[taskID];
200-
task.submissionTimeout = _submissionTimeout;
200+
task.submissionTimeout = _deadline - now;
201201
task.minPrice = _minPrice;
202202
task.maxPrice = msg.value;
203203
task.lastInteraction = now;

0 commit comments

Comments
 (0)