code: func ReadChainConfig(db ethdb.Reader, hash common.Hash) *params.ChainConfig {
  	data, _ := db.Get(configKey(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
  }
docs: // ReadChainConfig retrieves the consensus settings based on the given genesis hash.