Skip to content

Commit

Permalink
Merge pull request #218 from lidofinance/develop
Browse files Browse the repository at this point in the history
Develop to main
  • Loading branch information
DiRaiks authored Apr 15, 2024
2 parents 0867818 + d555798 commit f11d603
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,8 @@ export const calculateFrameByValidatorBalances = (args: calculateFrameByValidato
const sweepingMean = calculateSweepingMean(totalValidators).toNumber();
const framesOfSweepingMean = Math.ceil(sweepingMean / epochPerFrame);

return result.add(framesOfSweepingMean).toNumber();
const resultFrame = result.add(framesOfSweepingMean).toNumber();

// If withdrawable_epoch is less than current frame, should return next frame
return resultFrame < currentFrame ? currentFrame + 1 : resultFrame;
};

0 comments on commit f11d603

Please sign in to comment.