mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-02-26 15:47:21 +00:00
beacon/config: ignore nil values in config file (#33065)
YAML supports leaving out the value, so we should handle this condition in our limited parser.
This commit is contained in:
parent
3e48e0779c
commit
c55a12197e
2 changed files with 6 additions and 0 deletions
|
|
@ -103,6 +103,9 @@ func (c *ChainConfig) LoadForks(file []byte) error {
|
|||
epochs["GENESIS"] = 0
|
||||
|
||||
for key, value := range config {
|
||||
if value == nil {
|
||||
continue
|
||||
}
|
||||
if strings.HasSuffix(key, "_FORK_VERSION") {
|
||||
name := key[:len(key)-len("_FORK_VERSION")]
|
||||
switch version := value.(type) {
|
||||
|
|
|
|||
|
|
@ -15,6 +15,9 @@ ALTAIR_FORK_EPOCH: 1
|
|||
EIP7928_FORK_VERSION: 0xb0000038
|
||||
EIP7928_FORK_EPOCH: 18446744073709551615
|
||||
|
||||
EIP7XXX_FORK_VERSION:
|
||||
EIP7XXX_FORK_EPOCH:
|
||||
|
||||
BLOB_SCHEDULE: []
|
||||
`
|
||||
c := &ChainConfig{}
|
||||
|
|
|
|||
Loading…
Reference in a new issue