@@ -478,57 +478,6 @@ contract KlerosCore is IArbitrator {
478478 delayedStakeReadIndex = newDelayedStakeReadIndex;
479479 }
480480
481- /** @dev Allows an active dispute kit contract to manually unstake the ineligible juror. The main purpose of this function is to remove
482- * jurors that might obstruct the drawing process.
483- * @param _disputeID The ID of the dispute.
484- * @param _account The address of the juror.
485- * @return True if unstaking was successful.
486- */
487- function unstakeByDK (uint256 _disputeID , address _account ) external returns (bool ) {
488- Dispute storage dispute = disputes[_disputeID];
489- Round storage round = dispute.rounds[dispute.rounds.length - 1 ];
490- uint96 subcourtID = dispute.subcourtID;
491-
492- require (msg .sender == address (disputeKitNodes[round.disputeKitID].disputeKit), "Can only be called by DK " );
493- require (dispute.period == Period.evidence, "The dispute should be in Evidence period. " );
494-
495- Juror storage juror = jurors[_account];
496- bytes32 stakePathID = accountAndSubcourtIDToStakePathID (_account, subcourtID);
497- uint256 currentStake = sortitionSumTrees.stakeOf (bytes32 (uint256 (subcourtID)), stakePathID);
498-
499- uint256 transferredAmount;
500- transferredAmount = currentStake - juror.lockedTokens[subcourtID];
501- if (transferredAmount > 0 ) {
502- if (safeTransfer (_account, transferredAmount)) {
503- for (uint256 i = 0 ; i < juror.subcourtIDs.length ; i++ ) {
504- if (juror.subcourtIDs[i] == subcourtID) {
505- juror.subcourtIDs[i] = juror.subcourtIDs[juror.subcourtIDs.length - 1 ];
506- juror.subcourtIDs.pop ();
507- break ;
508- }
509- }
510- } else {
511- return false ;
512- }
513- }
514-
515- // Update juror's records.
516- juror.stakedTokens[subcourtID] = 0 ;
517-
518- // Update subcourt parents.
519- bool finished = false ;
520- uint256 currentSubcourtID = subcourtID;
521- while (! finished) {
522- sortitionSumTrees.set (bytes32 (currentSubcourtID), 0 , stakePathID);
523- if (currentSubcourtID == GENERAL_COURT) finished = true ;
524- else currentSubcourtID = courts[currentSubcourtID].parent;
525- }
526-
527- emit StakeSet (_account, subcourtID, 0 , 0 );
528-
529- return true ;
530- }
531-
532481 /** @dev Creates a dispute. Must be called by the arbitrable contract.
533482 * @param _numberOfChoices Number of choices for the jurors to choose from.
534483 * @param _extraData Additional info about the dispute. We use it to pass the ID of the dispute's subcourt (first 32 bytes),
0 commit comments