From f6008e57046821df8c3bdc6bc5368269db5854b4 Mon Sep 17 00:00:00 2001 From: Stefan Bratanov Date: Fri, 7 Jul 2023 15:27:11 +0100 Subject: [PATCH] more simpler calculation --- .../pegasys/teku/spec/logic/common/helpers/MiscHelpers.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ethereum/spec/src/main/java/tech/pegasys/teku/spec/logic/common/helpers/MiscHelpers.java b/ethereum/spec/src/main/java/tech/pegasys/teku/spec/logic/common/helpers/MiscHelpers.java index 027752c6965..3eb9549d551 100644 --- a/ethereum/spec/src/main/java/tech/pegasys/teku/spec/logic/common/helpers/MiscHelpers.java +++ b/ethereum/spec/src/main/java/tech/pegasys/teku/spec/logic/common/helpers/MiscHelpers.java @@ -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) {