diff --git a/doc.go b/doc.go index f3065900..a2c60e3e 100644 --- a/doc.go +++ b/doc.go @@ -9,8 +9,7 @@ As of May 2013, there are over 235,000 blocks in the Bitcoin block chain and and over 17 million transactions (which turns out to be over 11GB of data). btcdb provides a database layer to store and retrieve this data in a fairly simple and efficient manner. The use of this should not require specific -knowledge of the database backend used although currently only db_sqlite is -provided. +knowledge of the database backend. Basic Design @@ -20,8 +19,7 @@ increases monotonically. Each transaction belongs to a single block although a block can have a variable number of transactions. Along with these two items, several convenience functions for dealing with the database are provided as well as functions to query specific items -that may be present in a block or tx (although many of these are in -the sqlite3 subpackage). +that may be present in a block or tx. Usage @@ -34,14 +32,14 @@ referenced parent block to already exist. In a more concrete example: // Import packages. import ( "github.com/conformal/btcdb" - _ "github.com/conformal/btcdb/sqlite3" + _ "github.com/conformal/btcdb/ldb" "github.com/conformal/btcutil" "github.com/conformal/btcwire" ) // Create a database and schedule it to be closed on exit. dbName := "example.db" - db, err := btcdb.CreateDB("sqlite", dbName) + db, err := btcdb.CreateDB("leveldb", dbName) if err != nil { // Log and handle the error } diff --git a/ldb/doc.go b/ldb/doc.go index 9ee98f21..629d429a 100644 --- a/ldb/doc.go +++ b/ldb/doc.go @@ -3,20 +3,12 @@ // license that can be found in the LICENSE file. /* -Package sqlite3 implements a sqlite3 instance of btcdb. - -sqlite provides a zero setup, single file database. It requires cgo -and the presence of the sqlite library and headers, but nothing else. -The performance is generally high although it goes down with database -size. - -Many of the block or tx specific functions for btcdb are in this subpackage. +Package ldb implements a instance of btcdb backed by leveldb. Database version number is stored in a flat file .ver Currently a single (littlendian) integer in the file. If there is -additional data to save in the future, the presense of additional +additional data to save in the future, the presence of additional data can be indicated by changing the version number, then parsing the file differently. - */ package ldb