Skip to content

Commit

Permalink
Merge pull request #254 from lidofinance/feature/si-1575-update-calcu…
Browse files Browse the repository at this point in the history
…lation-time-for-validators-with-withdrawable-fix

fix: validator withdrawal calculation
  • Loading branch information
Tarens2 authored Sep 26, 2024
2 parents 862e46b + 16473cb commit ec408f0
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export function getValidatorWithdrawalTimestamp(
const diff = index.sub(lastWithdrawalValidatorIndex);
const percentOfActiveValidators = activeValidatorCount / totalValidatorsCount;
const lengthQueueValidators = diff.lt(0)
? BigNumber.from(activeValidatorCount).sub(lastWithdrawalValidatorIndex).add(index)
? BigNumber.from(totalValidatorsCount).sub(lastWithdrawalValidatorIndex).add(index)
: diff;

const slots = lengthQueueValidators.div(BigNumber.from(WITHDRAWALS_VALIDATORS_PER_SLOT));
Expand Down

0 comments on commit ec408f0

Please sign in to comment.