Skip to content

Commit

Permalink
chore
Browse files Browse the repository at this point in the history
  • Loading branch information
gothery001 committed Feb 25, 2022
1 parent 1f6131b commit ecf4a92
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions contracts/BSCValidatorSet.template
Original file line number Diff line number Diff line change
Expand Up @@ -566,6 +566,7 @@ contract BSCValidatorSet is IBSCValidatorSet, System, IParamSubscriber, IApplica

// make sure all new validators are cleared maintainInfo
// should not happen, still protect
numOfMaintaining = 0;
for (uint i = 0; i < currentValidatorSet.length; i++) {
validatorExtraSet[i].isMaintaining = false;
validatorExtraSet[i].enterMaintenanceHeight = 0;
Expand Down Expand Up @@ -670,14 +671,7 @@ contract BSCValidatorSet is IBSCValidatorSet, System, IParamSubscriber, IApplica
}
}

// 2. clear all maintain info
numOfMaintaining = 0;
for (uint i = 0; i < currentValidatorSet.length; i++) {
validatorExtraSet[i].isMaintaining = false;
validatorExtraSet[i].enterMaintenanceHeight = 0;
}

// 3. get unjailed validators from validatorSet
// 2. get unjailed validators from validatorSet
unjailedValidatorSet = new Validator[](_validatorSet.length - numOfFelony);
uint256 i = 0;
for (uint index = 0; index < _validatorSet.length; index++) {
Expand Down

0 comments on commit ecf4a92

Please sign in to comment.