Add InsertBlockData needed by tests to interface.

The function is being added back in since the tests rely on it, but it is
marked as DEPRECATED since it really should not be a part of the public
generic db interface.
This commit is contained in:
Dave Collins 2013-05-29 15:08:07 -05:00
parent 21b8011155
commit 9bf708595d
2 changed files with 5 additions and 1 deletions

5
db.go
View file

@ -85,6 +85,11 @@ type Db interface {
// into the database. // into the database.
InsertBlock(block *btcutil.Block) (blockid int64, err error) InsertBlock(block *btcutil.Block) (blockid int64, err error)
// InsertBlockData stores a block hash and its associated data block with a
// previous sha of `prevSha' and a version of `pver'. This function is
// DEPRECATED and should not be used.
InsertBlockData(sha *btcwire.ShaHash, prevSha *btcwire.ShaHash, pver uint32, buf []byte) (blockid int64, err error)
// InsertTx inserts a tx hash and its associated data into the database // InsertTx inserts a tx hash and its associated data into the database
InsertTx(txsha *btcwire.ShaHash, blockidx int64, txoff int, txlen int, usedbuf []byte) (err error) InsertTx(txsha *btcwire.ShaHash, blockidx int64, txoff int, txlen int, usedbuf []byte) (err error)

View file

@ -9,7 +9,6 @@ import (
"fmt" "fmt"
"github.com/conformal/btcdb" "github.com/conformal/btcdb"
"github.com/conformal/btcdb/sqlite3" "github.com/conformal/btcdb/sqlite3"
"github.com/conformal/btcutil"
"github.com/conformal/btcwire" "github.com/conformal/btcwire"
"os" "os"
"testing" "testing"