fmt
This commit is contained in:
parent
840708a3e7
commit
b4c6a5b8ab
3 changed files with 11 additions and 15 deletions
|
@ -90,7 +90,6 @@ out:
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
if height == 248 {
|
||||
}
|
||||
newheight, err := db.InsertBlock(block)
|
||||
|
|
|
@ -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) ()
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Add table
Reference in a new issue