Beispiel #1
0
func newDb() *LDBDatabase {
	file := filepath.Join("/", "tmp", "ldbtesttmpfile")
	if common.FileExist(file) {
		os.RemoveAll(file)
	}
	db, _ := NewLDBDatabase(file, 0)

	return db
}
Beispiel #2
0
func CheckLegalese(datadir string) {
	// check "first run"
	if !common.FileExist(datadir) {
		r, _ := PromptConfirm(legalese)
		if !r {
			Fatalf("Must accept to continue. Shutting down...\n")
		}
	}
}