github.com/BlockABC/godash@v0.0.0-20191112120524-f4aa3a32c566/database/ffldb/doc.go (about)

     1  // Copyright (c) 2015-2016 The btcsuite developers
     2  // Copyright (c) 2016 The Dash developers
     3  // Use of this source code is governed by an ISC
     4  // license that can be found in the LICENSE file.
     5  
     6  /*
     7  Package ffldb implements a driver for the database package that uses leveldb
     8  for the backing metadata and flat files for block storage.
     9  
    10  This driver is the recommended driver for use with btcd.  It makes use leveldb
    11  for the metadata, flat files for block storage, and checksums in key areas to
    12  ensure data integrity.
    13  
    14  Usage
    15  
    16  This package is a driver to the database package and provides the database type
    17  of "ffldb".  The parameters the Open and Create functions take are the
    18  database path as a string and the block network:
    19  
    20  	db, err := database.Open("ffldb", "path/to/database", wire.MainNet)
    21  	if err != nil {
    22  		// Handle error
    23  	}
    24  
    25  	db, err := database.Create("ffldb", "path/to/database", wire.MainNet)
    26  	if err != nil {
    27  		// Handle error
    28  	}
    29  */
    30  package ffldb