config

package
v0.0.0-...-49ff922 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 10, 2023 License: LGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Minimal_CapellaForkEpoch uint64 = 0
	Goerli_CapellaForkEpoch  uint64 = 162304
	Mainnet_CapellaForkEpoch uint64 = 194048
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ActiveSpec

type ActiveSpec string
const (
	Mainnet ActiveSpec = "mainnet"
	Minimal ActiveSpec = "minimal"
)

func ToSpec

func ToSpec(spec string) (ActiveSpec, error)

func (ActiveSpec) IsMainnet

func (a ActiveSpec) IsMainnet() bool

func (ActiveSpec) IsMinimal

func (a ActiveSpec) IsMinimal() bool

func (ActiveSpec) ToString

func (a ActiveSpec) ToString() string

type BeaconConfig

type BeaconConfig struct {
	Endpoint   string `mapstructure:"endpoint"`
	Spec       Spec   `mapstructure:"spec"`
	ActiveSpec string `mapstructure:"activeSpec"`
}

type Config

type Config struct {
	Source SourceConfig `mapstructure:"source"`
	Sink   SinkConfig   `mapstructure:"sink"`
}

func (Config) GetActiveSpec

func (c Config) GetActiveSpec() ActiveSpec

func (Config) GetSpecSettings

func (c Config) GetSpecSettings() SpecSettings

func (Config) GetSpecSettingsBySpec

func (c Config) GetSpecSettingsBySpec(spec ActiveSpec) SpecSettings

type SinkConfig

type SinkConfig struct {
	Parachain config.ParachainConfig `mapstructure:"parachain"`
}

type SourceConfig

type SourceConfig struct {
	Beacon BeaconConfig `mapstructure:"beacon"`
}

type Spec

type Spec struct {
	Minimal SpecSettings `mapstructure:"minimal"`
	Mainnet SpecSettings `mapstructure:"mainnet"`
}

type SpecSettings

type SpecSettings struct {
	SlotsInEpoch                 uint64 `mapstructure:"slotsInEpoch"`
	EpochsPerSyncCommitteePeriod uint64 `mapstructure:"epochsPerSyncCommitteePeriod"`
	MaxSlotsPerHistoricalRoot    int    `mapstructure:"maxSlotsPerHistoricalRoot"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL