core/rawdb, ethdb/pebble: avoid fsync db in tests (#27836)

Adds an option to disable fsync for database operations.
This is to make tests faster.
This commit is contained in:
Martin Holst Swende
2023-08-23 20:43:55 +02:00
committed by GitHub
parent 5c7136adb4
commit f0f8703bf2
6 changed files with 22 additions and 10 deletions
+2 -2
View File
@@ -28,8 +28,8 @@ const PebbleEnabled = true
// NewPebbleDBDatabase creates a persistent key-value database without a freezer
// moving immutable chain segments into cold storage.
func NewPebbleDBDatabase(file string, cache int, handles int, namespace string, readonly bool) (ethdb.Database, error) {
db, err := pebble.New(file, cache, handles, namespace, readonly)
func NewPebbleDBDatabase(file string, cache int, handles int, namespace string, readonly, ephemeral bool) (ethdb.Database, error) {
db, err := pebble.New(file, cache, handles, namespace, readonly, ephemeral)
if err != nil {
return nil, err
}