From 0f27343364aac5398fde4bcc0a12d948a97079de Mon Sep 17 00:00:00 2001 From: Jim McDonald Date: Thu, 23 Jan 2020 20:48:51 +0000 Subject: [PATCH] Fix deposit inclusion slot calculation (#4635) --- beacon-chain/rpc/validator/status.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/beacon-chain/rpc/validator/status.go b/beacon-chain/rpc/validator/status.go index 22773b314..68e55a890 100644 --- a/beacon-chain/rpc/validator/status.go +++ b/beacon-chain/rpc/validator/status.go @@ -186,9 +186,8 @@ func (vs *Server) depositBlockSlot(ctx context.Context, eth1BlockNumBigInt *big. followTime := time.Duration(params.BeaconConfig().Eth1FollowDistance*params.BeaconConfig().GoerliBlockTime) * time.Second eth1UnixTime := time.Unix(int64(blockTimeStamp), 0).Add(followTime) - votingPeriodSlots := helpers.StartSlot(params.BeaconConfig().SlotsPerEth1VotingPeriod / params.BeaconConfig().SlotsPerEpoch) - votingPeriodSeconds := time.Duration(votingPeriodSlots*params.BeaconConfig().SecondsPerSlot) * time.Second - timeToInclusion := eth1UnixTime.Add(votingPeriodSeconds) + votingPeriod := time.Duration(params.BeaconConfig().SlotsPerEth1VotingPeriod*params.BeaconConfig().SecondsPerSlot) * time.Second + timeToInclusion := eth1UnixTime.Add(votingPeriod) eth2Genesis := time.Unix(int64(beaconState.GenesisTime), 0)