Skip to content

Commit

Permalink
Fix deposit inclusion slot calculation (prysmaticlabs#4635)
Browse files Browse the repository at this point in the history
  • Loading branch information
mcdee authored and cryptomental committed Feb 24, 2020
1 parent 4f0eac3 commit ef7d2ff
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions beacon-chain/rpc/validator/status.go
Expand Up @@ -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)

Expand Down

0 comments on commit ef7d2ff

Please sign in to comment.