database_test.go 260 Bytes
Newer Older
obscuren's avatar
obscuren committed
1 2 3
package ethdb

import (
4 5 6 7
	"os"
	"path"

	"github.com/ethereum/go-ethereum/common"
obscuren's avatar
obscuren committed
8
)
9

10 11 12 13
func newDb() *LDBDatabase {
	file := path.Join("/", "tmp", "ldbtesttmpfile")
	if common.FileExist(file) {
		os.RemoveAll(file)
14 15
	}

16
	db, _ := NewLDBDatabase(file)
17

18
	return db
19
}