Skip to content

Commit

Permalink
fix WriteChainConfig
Browse files Browse the repository at this point in the history
  • Loading branch information
JukLee0ira committed Jan 20, 2025
1 parent e2f647f commit 471cfe0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions core/rawdb/accessors_metadata.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,12 @@ func WriteChainConfig(db ethdb.KeyValueWriter, hash common.Hash, cfg *params.Cha
return nil
}

jsonChainConfig, err := json.Marshal(cfg)
data, err := json.Marshal(cfg)
if err != nil {
log.Crit("Failed to JSON encode chain config", "err", err)
return err
}

return db.Put(append(configPrefix, hash[:]...), jsonChainConfig)
return db.Put(configKey(hash), data)
}

// ReadPreimage returns a Database instance with the key prefix for preimage entries.
Expand Down

0 comments on commit 471cfe0

Please sign in to comment.