Skip to content

Commit

Permalink
fix: validator withdrawal calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
Tarens2 committed Sep 26, 2024
1 parent 862e46b commit 16473cb
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 16473cb

Please sign in to comment.