From bee05db6037b925e6bf1f8026ec06a27e2a03757 Mon Sep 17 00:00:00 2001 From: Dale Rahn Date: Thu, 18 Jul 2013 18:19:57 -0400 Subject: [PATCH] Exunge debug code. --- sqlite3/insertremove_test.go | 8 -------- sqlite3/sqlite.go | 8 -------- sqlite3/sqlitedbcache.go | 6 ------ 3 files changed, 22 deletions(-) diff --git a/sqlite3/insertremove_test.go b/sqlite3/insertremove_test.go index f639369e1..4c26f10fc 100644 --- a/sqlite3/insertremove_test.go +++ b/sqlite3/insertremove_test.go @@ -5,17 +5,12 @@ package sqlite3_test import ( - //"compress/bzip2" - //"encoding/binary" "github.com/conformal/btcdb" "github.com/conformal/btcdb/sqlite3" "github.com/conformal/btcutil" "github.com/conformal/btcwire" - //"io" - "fmt" "os" "path/filepath" - //"strings" "testing" ) @@ -149,7 +144,6 @@ endtest: for _, spend := range txInList { itxe := txlookupmap[spend.Hash] if itxe.TxSpent[spend.Index] == false { - fmt.Printf("?? txin %v:%v is unspent %v\n", spend.Hash, spend.Index, itxe.TxSpent) t.Errorf("txin %v:%v is unspent %v", spend.Hash, spend.Index, itxe.TxSpent) } } @@ -188,7 +182,6 @@ endtest: for _, spend := range txInList { itxe := txlookupmap[spend.Hash] if itxe.TxSpent[spend.Index] == true { - fmt.Printf("?? txin %v:%v is spent %v\n", spend.Hash, spend.Index, itxe.TxSpent) t.Errorf("txin %v:%v is unspent %v", spend.Hash, spend.Index, itxe.TxSpent) } } @@ -209,7 +202,6 @@ endtest: for _, spend := range txInList { itxe := txlookupmap[spend.Hash] if itxe.TxSpent[spend.Index] == false { - fmt.Printf("?? txin %v:%v is unspent %v\n", spend.Hash, spend.Index, itxe.TxSpent) t.Errorf("txin %v:%v is unspent %v", spend.Hash, spend.Index, itxe.TxSpent) } } diff --git a/sqlite3/sqlite.go b/sqlite3/sqlite.go index 69f52b79d..6e16d70a5 100644 --- a/sqlite3/sqlite.go +++ b/sqlite3/sqlite.go @@ -828,11 +828,6 @@ func (db *SqliteDb) setclearSpentData(txsha *btcwire.ShaHash, idx uint32, set bo byteidx := idx / 8 byteoff := idx % 8 - interestingsha := txsha.String() == "866504b0d6242c237e484b49c6a5db1c234e9a1547e96b7ba3d690cabccbf6b0" - - if interestingsha { - fmt.Printf("txdata was %v ", spentdata) - } if set { spentdata[byteidx] |= (byte(1) << byteoff) } else { @@ -842,9 +837,6 @@ func (db *SqliteDb) setclearSpentData(txsha *btcwire.ShaHash, idx uint32, set bo if cached { txc.spent = spentdata } - if interestingsha { - fmt.Printf("now %v\n", spentdata) - } if usingtmp { txop = db.txop(txtmpUpdateUsedByShaStmt) diff --git a/sqlite3/sqlitedbcache.go b/sqlite3/sqlitedbcache.go index 3875f3a27..40813afa2 100644 --- a/sqlite3/sqlitedbcache.go +++ b/sqlite3/sqlitedbcache.go @@ -7,7 +7,6 @@ package sqlite3 import ( "bytes" "container/list" - "fmt" "github.com/conformal/btcdb" "github.com/conformal/btcutil" "github.com/conformal/btcwire" @@ -141,11 +140,6 @@ func (db *SqliteDb) FetchTxByShaList(txShaList []*btcwire.ShaHash) []*btcdb.TxLi btxspent[idx] = (txspent[byteidx] & (byte(1) << byteoff)) != 0 } } - interestingsha := txsha.String() == "866504b0d6242c237e484b49c6a5db1c234e9a1547e96b7ba3d690cabccbf6b" - if interestingsha { - fmt.Printf("usage of sha %v is %v\n", txsha, btxspent) - } - fmt.Printf("usage of sha %v is %v\n", txsha, btxspent) txlre := btcdb.TxListReply{Sha: txsha, Tx: tx, Height: height, TxSpent: btxspent, Err: err} replies = append(replies, &txlre) }