func (s *State) ProcessSlot(previousBlockRoot chainhash.Hash, c *config.Config) error {
	// increase the slot number
	s.Slot++

	s.LatestBlockHashes[(s.Slot-1)%c.LatestBlockRootsLength] = previousBlockRoot

	if s.Slot%c.LatestBlockRootsLength == 0 {
		latestBlockHashesRoot, err := ssz.HashTreeRoot(s.LatestBlockHashes)
		if err != nil {
			return err
		}
		s.BatchedBlockRoots = append(s.BatchedBlockRoots, latestBlockHashesRoot)
	}

	return nil
}
// ProcessSlot processes a single slot which should happen before the block transition and the epoch transition.
ProcessSlot processes a single slot which should happen before the block transition and the epoch transition.
// ProcessSlot processes a single slot which should happen before the block transition and the epoch transition .
func (s *State) ProcessSlot(previousBlockRoot chainhash.Hash, c *config.Config) error {
	s.Slot++
	s.LatestBlockHashes[(s.Slot-1)%c.LatestBlockRootsLength] = previousBlockRoot
	if s.Slot%c.LatestBlockRootsLength == 0 {
		latestBlockHashesRoot, err := ssz.HashTreeRoot(s.LatestBlockHashes)
		if err != nil {
			return err
		}
		s.BatchedBlockRoots = append(s.BatchedBlockRoots, latestBlockHashesRoot)
	}
	return nil
}
func ( s * State ) ProcessSlot ( previousBlockRoot chainhash . Hash , c * config . Config ) error { s . Slot ++ s . LatestBlockHashes [ ( s . Slot - 1 ) % c . LatestBlockRootsLength ] = previousBlockRoot if s . Slot % c . LatestBlockRootsLength == 0 { latestBlockHashesRoot , err := ssz . HashTreeRoot ( s . LatestBlockHashes ) if err != nil { return err } s . BatchedBlockRoots = append ( s . BatchedBlockRoots , latestBlockHashesRoot ) } return nil }
ProcessSlot processes a single slot which should happen before the block transition and the epoch transition.
ProcessSlot processes a single slot which should happen before the block transition and the epoch transition .
// increase the slot number