plugeth/ethdb/database_test.go
2015-05-12 15:20:53 +02:00

20 lines
273 B
Go

package ethdb
import (
"os"
"path/filepath"
"github.com/ethereum/go-ethereum/common"
)
func newDb() *LDBDatabase {
file := filepath.Join("/", "tmp", "ldbtesttmpfile")
if common.FileExist(file) {
os.RemoveAll(file)
}
db, _ := NewLDBDatabase(file)
return db
}