Skip to content

Commit 6f92514

Browse files
committed
refactor: add underscore prefix to internal function getExpectedVoteHash()
1 parent bd589e7 commit 6f92514

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ abstract contract DisputeKitClassicBase is IDisputeKit, Initializable, UUPSProxi
332332
// Save the votes.
333333
for (uint256 i = 0; i < _voteIDs.length; i++) {
334334
if (round.votes[_voteIDs[i]].account != _juror) revert JurorHasToOwnTheVote();
335-
if (hiddenVotes && getExpectedVoteHash(localDisputeID, localRoundID, _voteIDs[i]) != actualVoteHash)
335+
if (hiddenVotes && _getExpectedVoteHash(localDisputeID, localRoundID, _voteIDs[i]) != actualVoteHash)
336336
revert HashDoesNotMatchHiddenVoteCommitment();
337337
if (round.votes[_voteIDs[i]].voted) revert VoteAlreadyCast();
338338
round.votes[_voteIDs[i]].choice = _choice;
@@ -744,7 +744,7 @@ abstract contract DisputeKitClassicBase is IDisputeKit, Initializable, UUPSProxi
744744
/// @param _localRoundID The ID of the round in the Dispute Kit.
745745
/// @param _voteID The ID of the vote.
746746
/// @return The expected vote hash.
747-
function getExpectedVoteHash(
747+
function _getExpectedVoteHash(
748748
uint256 _localDisputeID,
749749
uint256 _localRoundID,
750750
uint256 _voteID

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,12 +164,16 @@ contract DisputeKitShutter is DisputeKitClassicBase {
164164
}
165165
}
166166

167+
// ************************************* //
168+
// * Internal * //
169+
// ************************************* //
170+
167171
/// @dev Returns the expected vote hash for a given vote.
168172
/// @param _localDisputeID The ID of the dispute in the Dispute Kit.
169173
/// @param _localRoundID The ID of the round in the Dispute Kit.
170174
/// @param _voteID The ID of the vote.
171175
/// @return The expected vote hash.
172-
function getExpectedVoteHash(
176+
function _getExpectedVoteHash(
173177
uint256 _localDisputeID,
174178
uint256 _localRoundID,
175179
uint256 _voteID

0 commit comments

Comments
 (0)