diff --git a/README.md b/README.md index a4704e31..42e67b80 100644 --- a/README.md +++ b/README.md @@ -82,7 +82,7 @@ intentionally causes an error by attempting to process a duplicate block. "fmt" "github.com/conformal/btcchain" "github.com/conformal/btcdb" - _ "github.com/conformal/btcdb/sqlite3" + _ "github.com/conformal/btcdb/ldb" "github.com/conformal/btcutil" "github.com/conformal/btcwire" "os" @@ -97,7 +97,7 @@ intentionally causes an error by attempting to process a duplicate block. // database. dbName := "example.db" _ = os.Remove(dbName) - db, err := btcdb.CreateDB("sqlite", dbName) + db, err := btcdb.CreateDB("leveldb", dbName) if err != nil { fmt.Printf("Failed to create database: %v\n", err) return @@ -122,7 +122,7 @@ intentionally causes an error by attempting to process a duplicate block. // Process a block. For this example, we are going to intentionally // cause an error by trying to process the genesis block which already // exists. - err = chain.ProcessBlock(genesisBlock) + err = chain.ProcessBlock(genesisBlock, false) if err != nil { fmt.Printf("Failed to process block: %v\n", err) return diff --git a/doc.go b/doc.go index 4138509e..33a27b80 100644 --- a/doc.go +++ b/doc.go @@ -72,7 +72,7 @@ intentionally causes an error by attempting to process a duplicate block. "fmt" "github.com/conformal/btcchain" "github.com/conformal/btcdb" - _ "github.com/conformal/btcdb/sqlite3" + _ "github.com/conformal/btcdb/ldb" "github.com/conformal/btcutil" "github.com/conformal/btcwire" "os" @@ -87,7 +87,7 @@ intentionally causes an error by attempting to process a duplicate block. // database. dbName := "example.db" _ = os.Remove(dbName) - db, err := btcdb.CreateDB("sqlite", dbName) + db, err := btcdb.CreateDB("leveldb", dbName) if err != nil { fmt.Printf("Failed to create database: %v\n", err) return