From 3da4582e0e9ccdcc95750644f926331b88730aab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Lesaege?= Date: Wed, 25 Mar 2020 21:12:14 +0000 Subject: [PATCH] [Feat] Input a deadline instead of a timeout --- contracts/standard/arbitration/Linguo.sol | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/contracts/standard/arbitration/Linguo.sol b/contracts/standard/arbitration/Linguo.sol index dc92f28c..d1dcd113 100644 --- a/contracts/standard/arbitration/Linguo.sol +++ b/contracts/standard/arbitration/Linguo.sol @@ -1,5 +1,5 @@ /** - * @authors: [@unknownunknown1] + * @authors: [@unknownunknown1*] * @reviewers: [@ferittuncer*, @clesaege*, @satello*] * @auditors: [] * @bounties: [] @@ -182,22 +182,22 @@ contract Linguo is Arbitrable { // **************************** // /** @dev Creates a task based on provided details. Requires a value of maximal price to be deposited. - * @param _submissionTimeout Time allotted for submitting a translation. + * @param _deadline The deadline for the translation to be completed. * @param _minPrice A minimal price of the translation. In wei. * @param _metaEvidence A URI of meta-evidence object for task submission. * @return taskID The ID of the created task. */ function createTask( - uint _submissionTimeout, + uint _deadline, uint _minPrice, string _metaEvidence ) external payable returns (uint taskID){ require(msg.value >= _minPrice, "Deposited value should be greater than or equal to the min price."); - require(_submissionTimeout > 0, "Submission timeout should not be 0."); + require(_deadline > now, "The deadline should be in the future."); taskID = tasks.length++; Task storage task = tasks[taskID]; - task.submissionTimeout = _submissionTimeout; + task.submissionTimeout = _deadline - now; task.minPrice = _minPrice; task.maxPrice = msg.value; task.lastInteraction = now;