Skip to content

Commit

Permalink
Standardize Validators.sol
Browse files Browse the repository at this point in the history
  • Loading branch information
pahor167 committed Sep 25, 2024
1 parent 1d4149e commit c41ae10
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions packages/protocol/contracts-0.8/governance/Validators.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down Expand Up @@ -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));

Expand Down

0 comments on commit c41ae10

Please sign in to comment.