forked from TrueCloudLab/neoneo-go
core: simplify newLevelDBForTesting function
This commit is contained in:
parent
c4c93b591e
commit
03a1cf9f59
1 changed files with 3 additions and 6 deletions
|
@ -9,13 +9,10 @@ import (
|
|||
|
||||
func newLevelDBForTesting(t testing.TB) Store {
|
||||
ldbDir := t.TempDir()
|
||||
dbConfig := dbconfig.DBConfiguration{
|
||||
Type: "leveldb",
|
||||
LevelDBOptions: dbconfig.LevelDBOptions{
|
||||
DataDirectoryPath: ldbDir,
|
||||
},
|
||||
opts := dbconfig.LevelDBOptions{
|
||||
DataDirectoryPath: ldbDir,
|
||||
}
|
||||
newLevelStore, err := NewLevelDBStore(dbConfig.LevelDBOptions)
|
||||
newLevelStore, err := NewLevelDBStore(opts)
|
||||
require.Nil(t, err, "NewLevelDBStore error")
|
||||
return newLevelStore
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue