Fix deposit inclusion slot calculation (#4635)

This commit is contained in:
Jim McDonald 2020-01-23 20:48:51 +00:00 committed by Ivan Martinez
parent 3388ab74cf
commit 0f27343364

View File

@ -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)