fix: use variable for slots per epoch in CL (#6864)

Some network might have different `SLOTS_PER_EPOCH` configs instead of
the currently hardcoded `32`.
This commit is contained in:
Philippe Schommers 2023-02-13 21:51:33 +01:00 committed by GitHub
parent 4079347dab
commit cb6878cd7d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -127,7 +127,7 @@ func startSentinel(cliCtx *cli.Context, cfg lcCli.ConsensusClientCliCfg, beaconS
ForkDigest: forkDigest, ForkDigest: forkDigest,
FinalizedRoot: beaconState.FinalizedCheckpoint().Root, FinalizedRoot: beaconState.FinalizedCheckpoint().Root,
FinalizedEpoch: beaconState.FinalizedCheckpoint().Epoch, FinalizedEpoch: beaconState.FinalizedCheckpoint().Epoch,
HeadSlot: beaconState.FinalizedCheckpoint().Epoch * 32, HeadSlot: beaconState.FinalizedCheckpoint().Epoch * cfg.BeaconCfg.SlotsPerEpoch,
HeadRoot: beaconState.FinalizedCheckpoint().Root, HeadRoot: beaconState.FinalizedCheckpoint().Root,
}, handshake.FullClientRule) }, handshake.FullClientRule)
if err != nil { if err != nil {