Skip to content

Commit

Permalink
more simpler calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
StefanBratanov committed Jul 7, 2023
1 parent 071b2d3 commit f6008e5
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ public UInt64 computeStartSlotAtEpoch(final UInt64 epoch) {
}

public UInt64 computeEndSlotAtEpoch(final UInt64 epoch) {
return computeStartSlotAtEpoch(epoch.plus(1)).minusMinZero(1);
return computeStartSlotAtEpoch(epoch).plus(specConfig.getSlotsPerEpoch() - 1);
}

public UInt64 computeSlotAtTime(final UInt64 genesisTime, final UInt64 currentTime) {
Expand Down

0 comments on commit f6008e5

Please sign in to comment.