diff --git a/state/aggregator_bench_test.go b/state/aggregator_bench_test.go index 143a6170e..830392cd3 100644 --- a/state/aggregator_bench_test.go +++ b/state/aggregator_bench_test.go @@ -19,7 +19,7 @@ func testDbAndAggregatorBench(b *testing.B, prefixLen int, aggStep uint64) (stri path := b.TempDir() b.Cleanup(func() { os.RemoveAll(path) }) logger := log.New() - db := mdbx.NewMDBX(logger).Path(path).WithTableCfg(func(defaultBuckets kv.TableCfg) kv.TableCfg { + db := mdbx.NewMDBX(logger).InMem(path).WithTableCfg(func(defaultBuckets kv.TableCfg) kv.TableCfg { return kv.ChaindataTablesCfg }).MustOpen() b.Cleanup(db.Close) diff --git a/state/aggregator_test.go b/state/aggregator_test.go index 8e80684e4..96077aec2 100644 --- a/state/aggregator_test.go +++ b/state/aggregator_test.go @@ -24,7 +24,7 @@ func testDbAndAggregator(t *testing.T, prefixLen int, aggStep uint64) (string, k path := t.TempDir() t.Cleanup(func() { os.RemoveAll(path) }) logger := log.New() - db := mdbx.NewMDBX(logger).Path(filepath.Join(path, "db4")).WithTableCfg(func(defaultBuckets kv.TableCfg) kv.TableCfg { + db := mdbx.NewMDBX(logger).InMem(filepath.Join(path, "db4")).WithTableCfg(func(defaultBuckets kv.TableCfg) kv.TableCfg { return kv.ChaindataTablesCfg }).MustOpen() t.Cleanup(db.Close) @@ -259,7 +259,7 @@ func TestAggregator_RestartOnFiles(t *testing.T) { require.NoError(t, os.RemoveAll(filepath.Join(path, "db4"))) - newDb, err := mdbx.NewMDBX(log.New()).Path(filepath.Join(path, "db4")).WithTableCfg(func(defaultBuckets kv.TableCfg) kv.TableCfg { + newDb, err := mdbx.NewMDBX(log.New()).InMem(filepath.Join(path, "db4")).WithTableCfg(func(defaultBuckets kv.TableCfg) kv.TableCfg { return kv.ChaindataTablesCfg }).Open() require.NoError(t, err) diff --git a/state/domain_test.go b/state/domain_test.go index 0272258a4..742bad1f3 100644 --- a/state/domain_test.go +++ b/state/domain_test.go @@ -47,7 +47,7 @@ func testDbAndDomain(t *testing.T, prefixLen int) (string, kv.RwDB, *Domain) { historyValsTable := "HistoryVals" settingsTable := "Settings" indexTable := "Index" - db := mdbx.NewMDBX(logger).Path(path).WithTableCfg(func(defaultBuckets kv.TableCfg) kv.TableCfg { + db := mdbx.NewMDBX(logger).InMem(path).WithTableCfg(func(defaultBuckets kv.TableCfg) kv.TableCfg { return kv.TableCfg{ keysTable: kv.TableCfgItem{Flags: kv.DupSort}, valsTable: kv.TableCfgItem{}, diff --git a/state/history_test.go b/state/history_test.go index a99943694..f202f59d2 100644 --- a/state/history_test.go +++ b/state/history_test.go @@ -43,7 +43,7 @@ func testDbAndHistory(tb testing.TB) (string, kv.RwDB, *History) { indexTable := "Index" valsTable := "Vals" settingsTable := "Settings" - db := mdbx.NewMDBX(logger).Path(path).WithTableCfg(func(defaultBuckets kv.TableCfg) kv.TableCfg { + db := mdbx.NewMDBX(logger).InMem(path).WithTableCfg(func(defaultBuckets kv.TableCfg) kv.TableCfg { return kv.TableCfg{ keysTable: kv.TableCfgItem{Flags: kv.DupSort}, indexTable: kv.TableCfgItem{Flags: kv.DupSort}, diff --git a/state/inverted_index_test.go b/state/inverted_index_test.go index 42c38d271..94d9fe940 100644 --- a/state/inverted_index_test.go +++ b/state/inverted_index_test.go @@ -43,7 +43,7 @@ func testDbAndInvertedIndex(t *testing.T, aggStep uint64) (string, kv.RwDB, *Inv logger := log.New() keysTable := "Keys" indexTable := "Index" - db := mdbx.NewMDBX(logger).Path(path).WithTableCfg(func(defaultBuckets kv.TableCfg) kv.TableCfg { + db := mdbx.NewMDBX(logger).InMem(path).WithTableCfg(func(defaultBuckets kv.TableCfg) kv.TableCfg { return kv.TableCfg{ keysTable: kv.TableCfgItem{Flags: kv.DupSort}, indexTable: kv.TableCfgItem{Flags: kv.DupSort},