Skip to content

Commit

Permalink
fix(rln): incl userMessageLimit in validateRegistration
Browse files Browse the repository at this point in the history
  • Loading branch information
rymnc committed Jan 24, 2024
1 parent 5d9108a commit 1c7e144
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Rln.sol
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ contract Rln is RlnBase {
RlnBase(membershipDeposit, depth, maxMessageLimit, _verifier)
{ }

function _validateRegistration(uint256 idCommitment) internal pure override { }
function _validateRegistration(uint256 idCommitment, uint256 userMessageLimit) internal pure override { }

Check warning on line 16 in src/Rln.sol

View workflow job for this annotation

GitHub Actions / lint

Code contains empty blocks

function _validateSlash(
uint256 idCommitment,
Expand Down
4 changes: 2 additions & 2 deletions src/RlnBase.sol
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ abstract contract RlnBase {
if (msg.value != requiredDeposit) {
revert InsufficientDeposit(MEMBERSHIP_DEPOSIT, msg.value);
}
_validateRegistration(idCommitment);
_validateRegistration(idCommitment, userMessageLimit);
_register(idCommitment, userMessageLimit, msg.value);
}

Expand All @@ -170,7 +170,7 @@ abstract contract RlnBase {
}

/// @dev Inheriting contracts MUST override this function
function _validateRegistration(uint256 idCommitment) internal view virtual;
function _validateRegistration(uint256 idCommitment, uint256 userMessageLimit) internal view virtual;

/// @dev Allows a user to slash a member
/// @param idCommitment The idCommitment of the member
Expand Down

0 comments on commit 1c7e144

Please sign in to comment.