func newDb() *LDBDatabase { file := filepath.Join("/", "tmp", "ldbtesttmpfile") if common.FileExist(file) { os.RemoveAll(file) } db, _ := NewLDBDatabase(file, 0) return db }
func CheckLegalese(datadir string) { // check "first run" if !common.FileExist(datadir) { r, _ := PromptConfirm(legalese) if !r { Fatalf("Must accept to continue. Shutting down...\n") } } }