This commit is contained in:
Dale Rahn 2013-08-22 09:32:23 -04:00
parent 840708a3e7
commit b4c6a5b8ab
3 changed files with 11 additions and 15 deletions

View file

@ -90,7 +90,6 @@ out:
}
}
if height == 248 {
}
newheight, err := db.InsertBlock(block)

View file

@ -156,7 +156,6 @@ out:
}
}
// now that db is populated, do some additional test
testFetchRangeHeight(t, db, blocks)
@ -365,8 +364,7 @@ func loadBlocks(t *testing.T, file string) (blocks []*btcutil.Block, err error)
return
}
func testFetchRangeHeight(t *testing.T, db btcdb.Db, blocks []*btcutil.Block) () {
func testFetchRangeHeight(t *testing.T, db btcdb.Db, blocks []*btcutil.Block) {
var testincrement int64 = 50
var testcnt int64 = 100
@ -412,5 +410,4 @@ func testFetchRangeHeight(t *testing.T, db btcdb.Db, blocks []*btcutil.Block) ()
}
}
}

View file

@ -576,7 +576,7 @@ func (db *SqliteDb) DropAfterBlockBySha(sha *btcwire.ShaHash) (err error) {
return db.delFromDB(keepidx)
}
func (db *SqliteDb) delFromDB(keepidx int64) (error) {
func (db *SqliteDb) delFromDB(keepidx int64) error {
tx := &db.txState
_, err := tx.tx.Exec("DELETE FROM txtmp WHERE blockid > ?", keepidx)
if err != nil {