aboutsummaryrefslogblamecommitdiffstats
path: root/ethdb/database_test.go
blob: a80976a9a3cf61d3127ffc4ef0b5c4e1c913f6aa (plain) (tree)
1
2
3
4
5
6
7
8
9


             
            
                       

                                                
 
 
                           
                                                           

                                   

         
                                     
 
                 
 
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
}