Exunge debug code.

This commit is contained in:
Dale Rahn 2013-07-18 18:19:57 -04:00
parent 66731c1a1e
commit bee05db603
3 changed files with 0 additions and 22 deletions

View file

@ -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)
}
}

View file

@ -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)

View file

@ -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)
}