fix(rln): incl userMessageLimit in validateRegistration
This commit is contained in:
parent
5d9108a138
commit
1c7e14482b
|
@ -13,7 +13,7 @@ contract Rln is RlnBase {
|
||||||
RlnBase(membershipDeposit, depth, maxMessageLimit, _verifier)
|
RlnBase(membershipDeposit, depth, maxMessageLimit, _verifier)
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
function _validateRegistration(uint256 idCommitment) internal pure override { }
|
function _validateRegistration(uint256 idCommitment, uint256 userMessageLimit) internal pure override { }
|
||||||
|
|
||||||
function _validateSlash(
|
function _validateSlash(
|
||||||
uint256 idCommitment,
|
uint256 idCommitment,
|
||||||
|
|
|
@ -147,7 +147,7 @@ abstract contract RlnBase {
|
||||||
if (msg.value != requiredDeposit) {
|
if (msg.value != requiredDeposit) {
|
||||||
revert InsufficientDeposit(MEMBERSHIP_DEPOSIT, msg.value);
|
revert InsufficientDeposit(MEMBERSHIP_DEPOSIT, msg.value);
|
||||||
}
|
}
|
||||||
_validateRegistration(idCommitment);
|
_validateRegistration(idCommitment, userMessageLimit);
|
||||||
_register(idCommitment, userMessageLimit, msg.value);
|
_register(idCommitment, userMessageLimit, msg.value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -170,7 +170,7 @@ abstract contract RlnBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @dev Inheriting contracts MUST override this function
|
/// @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
|
/// @dev Allows a user to slash a member
|
||||||
/// @param idCommitment The idCommitment of the member
|
/// @param idCommitment The idCommitment of the member
|
||||||
|
|
Loading…
Reference in New Issue