cleanup goleveldb dirs

This commit is contained in:
ValarDragon 2018-08-30 23:42:12 -07:00
parent a69725d40d
commit e64c6da6f2
1 changed files with 6 additions and 2 deletions

View File

@ -124,10 +124,14 @@ func BenchmarkFullGaiaSimulation(b *testing.B) {
var logger log.Logger
logger = log.NewNopLogger()
var db dbm.DB
db = dbm.NewMemDB()
if usegoleveldb {
db, _ = dbm.NewGoLevelDB("Simulation", os.TempDir())
dir := os.TempDir()
db, _ = dbm.NewGoLevelDB("Simulation", dir)
defer os.RemoveAll(dir)
} else {
db = dbm.NewMemDB()
}
defer db.Close()
app := NewGaiaApp(logger, db, nil)
// Run randomized simulation