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.
|
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
|
|
}
|
|
|