From 9bf708595d9a94ed5c2b68677b5febeeb7b26f0d Mon Sep 17 00:00:00 2001 From: Dave Collins Date: Wed, 29 May 2013 15:08:07 -0500 Subject: [PATCH] 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. --- db.go | 5 +++++ sqlite3/sqliteblock_test.go | 1 - 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/db.go b/db.go index 226f3488..fe9fcb40 100644 --- a/db.go +++ b/db.go @@ -85,6 +85,11 @@ type Db interface { // into the database. 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(txsha *btcwire.ShaHash, blockidx int64, txoff int, txlen int, usedbuf []byte) (err error) diff --git a/sqlite3/sqliteblock_test.go b/sqlite3/sqliteblock_test.go index ec7a55fe..80622436 100644 --- a/sqlite3/sqliteblock_test.go +++ b/sqlite3/sqliteblock_test.go @@ -9,7 +9,6 @@ import ( "fmt" "github.com/conformal/btcdb" "github.com/conformal/btcdb/sqlite3" - "github.com/conformal/btcutil" "github.com/conformal/btcwire" "os" "testing"