mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-11-22 19:29:39 +00:00
core: refactor Level store creation for tests
We don't need to create the whole DB configuration structure.
This commit is contained in:
parent
339bec1632
commit
21515e1835
1 changed files with 3 additions and 6 deletions
|
@ -69,13 +69,10 @@ func newTestChainWithCustomCfgAndStore(t testing.TB, st storage.Store, f func(*c
|
|||
|
||||
func newLevelDBForTesting(t testing.TB) storage.Store {
|
||||
ldbDir := t.TempDir()
|
||||
dbConfig := storage.DBConfiguration{
|
||||
Type: "leveldb",
|
||||
LevelDBOptions: storage.LevelDBOptions{
|
||||
DataDirectoryPath: ldbDir,
|
||||
},
|
||||
dbOptions := storage.LevelDBOptions{
|
||||
DataDirectoryPath: ldbDir,
|
||||
}
|
||||
newLevelStore, err := storage.NewLevelDBStore(dbConfig.LevelDBOptions)
|
||||
newLevelStore, err := storage.NewLevelDBStore(dbOptions)
|
||||
require.Nil(t, err, "NewLevelDBStore error")
|
||||
return newLevelStore
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue