github.com/btcsuite/btcd@v0.24.0/database/ffldb/README.md (about)

     1  ffldb
     2  =====
     3  
     4  [![Build Status](https://github.com/btcsuite/btcd/workflows/Build%20and%20Test/badge.svg)](https://github.com/btcsuite/btcd/actions)
     5  [![ISC License](http://img.shields.io/badge/license-ISC-blue.svg)](http://copyfree.org)
     6  [![GoDoc](https://pkg.go.dev/github.com/btcsuite/btcd/database/ffldb?status.png)](https://pkg.go.dev/github.com/btcsuite/btcd/database/ffldb)
     7  =======
     8  
     9  Package ffldb implements a driver for the database package that uses leveldb for
    10  the backing metadata and flat files for block storage.
    11  
    12  This driver is the recommended driver for use with btcd.  It makes use leveldb
    13  for the metadata, flat files for block storage, and checksums in key areas to
    14  ensure data integrity.
    15  
    16  Package ffldb is licensed under the copyfree ISC license.
    17  
    18  ## Usage
    19  
    20  This package is a driver to the database package and provides the database type
    21  of "ffldb".  The parameters the Open and Create functions take are the
    22  database path as a string and the block network.
    23  
    24  ```Go
    25  db, err := database.Open("ffldb", "path/to/database", wire.MainNet)
    26  if err != nil {
    27  	// Handle error
    28  }
    29  ```
    30  
    31  ```Go
    32  db, err := database.Create("ffldb", "path/to/database", wire.MainNet)
    33  if err != nil {
    34  	// Handle error
    35  }
    36  ```
    37  
    38  ## License
    39  
    40  Package ffldb is licensed under the [copyfree](http://copyfree.org) ISC
    41  License.