Skip to content

Commit

Permalink
fix(appealable-arbitrator): update currentRuling to take appeals into…
Browse files Browse the repository at this point in the history
… consideration
  • Loading branch information
0xferit committed Mar 14, 2019
1 parent 082bde4 commit 804186b
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions contracts/standard/arbitration/AppealableArbitrator.sol
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,16 @@ contract AppealableArbitrator is CentralizedArbitrator, Arbitrable {
else status = disputes[_disputeID].status;
}

/** @dev Return the ruling of a dispute.
* @param _disputeID ID of the dispute to rule.
* @return ruling The ruling which would or has been given.
*/
function currentRuling(uint _disputeID) public view returns(uint ruling) {
if (appealDisputes[_disputeID].arbitrator != Arbitrator(address(0))) // Appealed.
ruling = appealDisputes[_disputeID].arbitrator.currentRuling(appealDisputes[_disputeID].appealDisputeID); // Retrieve ruling from the arbitrator whom the dispute is appealed to.
else ruling = disputes[_disputeID].ruling; // Not appealed, basic case.
}

/* Internal */

/** @dev Executes the ruling of the specified dispute.
Expand Down

0 comments on commit 804186b

Please sign in to comment.