func ReadChainConfig(db DatabaseReader, hash common.Hash) *params.ChainConfig {
	data, _ := db.Get(append(configPrefix, hash[:]...))
	if len(data) == 0 {
		return nil
	}
	var config params.ChainConfig
	if err := json.Unmarshal(data, &config); err != nil {
		log.Error("Invalid chain config JSON", "hash", hash, "err", err)
		return nil
	}
	return &config
}
// ReadChainConfig retrieves the consensus settings based on the given genesis hash.
ReadChainConfig retrieves the consensus settings based on the given genesis hash.
// ReadChainConfig retrieves the consensus settings based on the given genesis hash .
func ReadChainConfig(db DatabaseReader, hash common.Hash) *params.ChainConfig {
	data, _ := db.Get(append(configPrefix, hash[:]...))
	if len(data) == 0 {
		return nil
	}
	var config params.ChainConfig
	if err := json.Unmarshal(data, &config); err != nil {
		log.Error("Invalid chain config JSON", "hash", hash, "err", err)
		return nil
	}
	return &config
}
func ReadChainConfig ( db DatabaseReader , hash common . Hash ) * params . ChainConfig { data , _ := db . Get ( append ( configPrefix , hash [ : ] ... ) ) if len ( data ) == 0 { return nil } var config params . ChainConfig if err := json . Unmarshal ( data , & config ) ; err != nil { log . Error ( " " , " " , hash , " " , err ) return nil } return & config }
ReadChainConfig retrieves the consensus settings based on the given genesis hash.
ReadChainConfig retrieves the consensus settings based on the given genesis hash .