mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
Update config.go
This commit is contained in:
parent
c53ce79a3a
commit
88b449d321
1 changed files with 3 additions and 4 deletions
|
|
@ -138,9 +138,9 @@ func (c *ChainConfig) AddFork(name string, epoch uint64, version []byte) *ChainC
|
||||||
knownIndex := slices.Index(knownForks, name)
|
knownIndex := slices.Index(knownForks, name)
|
||||||
if knownIndex == -1 {
|
if knownIndex == -1 {
|
||||||
knownIndex = math.MaxInt // assume that the unknown fork happens after the known ones
|
knownIndex = math.MaxInt // assume that the unknown fork happens after the known ones
|
||||||
}
|
if epoch != math.MaxUint64 {
|
||||||
if knownIndex == math.MaxInt && epoch != math.MaxUint64 {
|
log.Warn("Unknown fork in config.yaml", "fork name", name, "known forks", knownForks)
|
||||||
log.Warn("Unknown fork in config.yaml", "fork name", name, "known forks", knownForks)
|
}
|
||||||
}
|
}
|
||||||
fork := &Fork{
|
fork := &Fork{
|
||||||
Name: name,
|
Name: name,
|
||||||
|
|
@ -149,7 +149,6 @@ func (c *ChainConfig) AddFork(name string, epoch uint64, version []byte) *ChainC
|
||||||
knownIndex: knownIndex,
|
knownIndex: knownIndex,
|
||||||
}
|
}
|
||||||
fork.computeDomain(c.GenesisValidatorsRoot)
|
fork.computeDomain(c.GenesisValidatorsRoot)
|
||||||
|
|
||||||
c.Forks = append(c.Forks, fork)
|
c.Forks = append(c.Forks, fork)
|
||||||
sort.Sort(c.Forks)
|
sort.Sort(c.Forks)
|
||||||
return c
|
return c
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue