Official Go implementation of the Ethereum protocol
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
go-ethereum/ethdb/database_test.go

19 lines
260 B

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