mirror of
https://github.com/vacp2p/rln-contract.git
synced 2026-01-07 22:04:06 -05:00
fix(rln): incl userMessageLimit in validateRegistration
This commit is contained in:
@@ -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 { }
|
||||
|
||||
function _validateSlash(
|
||||
uint256 idCommitment,
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user