code: func (api *PrivateAdminAPI) ExportChain(file string) (bool, error) {
  	// Make sure we can create the file to export into
  	out, err := os.OpenFile(file, os.O_CREATE|os.O_WRONLY|os.O_TRUNC, os.ModePerm)
  	if err != nil {
  		return false, err
  	}
  	defer out.Close()
  
  	var writer io.Writer = out
  	if strings.HasSuffix(file, ".gz") {
  		writer = gzip.NewWriter(writer)
  		defer writer.(*gzip.Writer).Close()
  	}
  
  	// Export the blockchain
  	if err := api.eth.BlockChain().Export(writer); err != nil {
  		return false, err
  	}
  	return true, nil
  }
docs: // ExportChain exports the current blockchain into a local file.