mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-25 12:57:18 +00:00
Validator: Choose a reasonable cap for the attested target epochs slice (#8452)
* Choose a reasonable cap for the attested target epochs slice * revert bazelrc Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
This commit is contained in:
parent
4bed8d4ed4
commit
aef5a7b428
@ -174,7 +174,7 @@ func (s *Store) CheckSlashableAttestation(
|
||||
existingSourceEpoch := bytesutil.BytesToEpochBigEndian(sourceEpochBytes)
|
||||
|
||||
// There can be multiple target epochs attested per source epoch.
|
||||
attestedTargetEpochs := make([]types.Epoch, 0)
|
||||
attestedTargetEpochs := make([]types.Epoch, 0, len(targetEpochsBytes)/8)
|
||||
for i := 0; i < len(targetEpochsBytes); i += 8 {
|
||||
targetEpoch := bytesutil.BytesToEpochBigEndian(targetEpochsBytes[i : i+8])
|
||||
attestedTargetEpochs = append(attestedTargetEpochs, targetEpoch)
|
||||
|
Loading…
Reference in New Issue
Block a user