Skip to content

Commit

Permalink
court: drop redundant areAllJurorsSettled function
Browse files Browse the repository at this point in the history
  • Loading branch information
facuspagnuolo committed Aug 25, 2019
1 parent 941f72d commit 6f4dce2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 0 additions & 4 deletions contracts/Court.sol
Original file line number Diff line number Diff line change
Expand Up @@ -696,10 +696,6 @@ contract Court is IJurorsRegistryOwner, ICRVotingOwner, ISubscriptionsOwner, Tim
return round.filledSeats == round.jurorNumber;
}

function areAllJurorsSettled(uint256 _disputeId, uint256 _roundId) public view returns (bool) {
return disputes[_disputeId].rounds[_roundId].settledPenalties;
}

function canTransitionTerm() public view returns (bool) {
return neededTermTransitions() >= 1;
}
Expand Down
4 changes: 2 additions & 2 deletions test/court-batches.js
Original file line number Diff line number Diff line change
Expand Up @@ -319,10 +319,10 @@ contract('Court: Batches', ([ rich, arbitrable, juror1, juror2, juror3, juror4,
it('settles in 2 batches', async () => {
const batchSize = 4
await this.court.settleRoundSlashing(disputeId, firstRoundId, batchSize)
assert.isFalse(await this.court.areAllJurorsSettled.call(disputeId, firstRoundId))
assert.isFalse((await this.court.getAdjudicationRound.call(disputeId, firstRoundId))[3])
const receipt = await this.court.settleRoundSlashing(disputeId, firstRoundId, batchSize)
assertLogs(receipt, ROUND_SLASHING_SETTLED_EVENT)
assert.isTrue(await this.court.areAllJurorsSettled.call(disputeId, firstRoundId))
assert.isTrue((await this.court.getAdjudicationRound.call(disputeId, firstRoundId))[3])
})
})
})

0 comments on commit 6f4dce2

Please sign in to comment.