From c41ae10e1bf486a6988305a6cc7bed2b84f7d746 Mon Sep 17 00:00:00 2001 From: pahor167 Date: Wed, 25 Sep 2024 09:19:24 +0200 Subject: [PATCH] Standardize Validators.sol --- .../protocol/contracts-0.8/governance/Validators.sol | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/packages/protocol/contracts-0.8/governance/Validators.sol b/packages/protocol/contracts-0.8/governance/Validators.sol index 18504596df4..22e491d73fb 100644 --- a/packages/protocol/contracts-0.8/governance/Validators.sol +++ b/packages/protocol/contracts-0.8/governance/Validators.sol @@ -255,7 +255,7 @@ contract Validators is bytes calldata blsPublicKey, bytes calldata blsPop ) external nonReentrant returns (bool) { - allowOnlyL1(); + allowOnlyL1(); // For L2, use registerValidatorNoBls address account = getAccounts().validatorSignerToAccount(msg.sender); _isRegistrationAllowed(account); require(!isValidator(account) && !isValidatorGroup(account), "Already registered"); @@ -1428,12 +1428,7 @@ contract Validators is */ function updateMembershipHistory(address account, address group) private returns (bool) { MembershipHistory storage history = validators[account].membershipHistory; - uint256 epochNumber; - if (isL2()) { - epochNumber = getEpochManager().getCurrentEpochNumber(); - } else { - epochNumber = getEpochNumber(); - } + uint256 epochNumber = _getEpochNumber(); uint256 head = history.numEntries == 0 ? 0 : history.tail.add(history.numEntries.sub(1));