Skip to content

Commit 6cbd494

Browse files
committed
fix: small fixes
1 parent 973f572 commit 6cbd494

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

contracts/src/arbitration/KlerosCore.sol

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1263,6 +1263,7 @@ contract KlerosCore is IArbitratorV2, Initializable, UUPSProxiable {
12631263
_dispute.courtID,
12641264
_court.parent,
12651265
_court.jurorsForCourtJump,
1266+
disputeKitID,
12661267
_round.nbVotes
12671268
);
12681269

@@ -1271,6 +1272,7 @@ contract KlerosCore is IArbitratorV2, Initializable, UUPSProxiable {
12711272
// Fall back to `DisputeKitClassic` which is always supported.
12721273
newDisputeKitID = DISPUTE_KIT_CLASSIC;
12731274
disputeKitJump = (newDisputeKitID != disputeKitID);
1275+
newRoundNbVotes = (newRoundNbVotes * 2) + 1; // Reset nbVotes to the default logic.
12741276
}
12751277
}
12761278

contracts/src/arbitration/dispute-kits/DisputeKitClassicBase.sol

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -633,6 +633,7 @@ abstract contract DisputeKitClassicBase is IDisputeKit, Initializable, UUPSProxi
633633
uint96 _currentCourtID,
634634
uint96 _parentCourtID,
635635
uint256 _currentCourtJurorsForJump,
636+
uint256 _currentDisputeKitID,
636637
uint256 _currentRoundNbVotes
637638
)
638639
public
@@ -665,7 +666,10 @@ abstract contract DisputeKitClassicBase is IDisputeKit, Initializable, UUPSProxi
665666
newCourtID = courtJump ? _parentCourtID : _currentCourtID;
666667
}
667668
if (newDisputeKitID == 0) {
668-
newDisputeKitID = DISPUTE_KIT_CLASSIC;
669+
newDisputeKitID = _currentDisputeKitID;
670+
}
671+
if (!disputeKitJump) {
672+
disputeKitJump = (newDisputeKitID != _currentDisputeKitID);
669673
}
670674
}
671675

contracts/src/arbitration/interfaces/IDisputeKit.sol

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ interface IDisputeKit {
130130
/// @param _currentCourtID The ID of the current court.
131131
/// @param _parentCourtID The ID of the parent court.
132132
/// @param _currentCourtJurorsForJump The court jump threshold defined by the current court.
133+
/// @param _currentDisputeKitID The ID of the current dispute kit.
133134
/// @param _currentRoundNbVotes The number of votes in the current round.
134135
/// @return newCourtID Court ID after jump.
135136
/// @return newDisputeKitID Dispute kit ID after jump.
@@ -141,6 +142,7 @@ interface IDisputeKit {
141142
uint96 _currentCourtID,
142143
uint96 _parentCourtID,
143144
uint256 _currentCourtJurorsForJump,
145+
uint256 _currentDisputeKitID,
144146
uint256 _currentRoundNbVotes
145147
)
146148
external

0 commit comments

Comments
 (0)