@@ -36,11 +36,6 @@ type openOptions struct {
3636 Cache int // the capacity(in megabytes) of the data caching
3737 Handles int // number of files to be open simultaneously
3838 ReadOnly bool
39-
40- // Ephemeral means that filesystem sync operations should be avoided:
41- // data integrity in the face of a crash is not important. This option
42- // should typically be used in tests.
43- Ephemeral bool
4439}
4540
4641// openDatabase opens both a disk-based key-value database such as leveldb or pebble, but also
@@ -83,15 +78,15 @@ func openKeyValueDatabase(o openOptions) (ethdb.Database, error) {
8378 }
8479 if o .Type == rawdb .DBPebble || existingDb == rawdb .DBPebble {
8580 log .Info ("Using pebble as the backing database" )
86- return newPebbleDBDatabase (o .Directory , o .Cache , o .Handles , o .Namespace , o .ReadOnly , o . Ephemeral )
81+ return newPebbleDBDatabase (o .Directory , o .Cache , o .Handles , o .Namespace , o .ReadOnly )
8782 }
8883 if o .Type == rawdb .DBLeveldb || existingDb == rawdb .DBLeveldb {
8984 log .Info ("Using leveldb as the backing database" )
9085 return newLevelDBDatabase (o .Directory , o .Cache , o .Handles , o .Namespace , o .ReadOnly )
9186 }
9287 // No pre-existing database, no user-requested one either. Default to Pebble.
9388 log .Info ("Defaulting to pebble as the backing database" )
94- return newPebbleDBDatabase (o .Directory , o .Cache , o .Handles , o .Namespace , o .ReadOnly , o . Ephemeral )
89+ return newPebbleDBDatabase (o .Directory , o .Cache , o .Handles , o .Namespace , o .ReadOnly )
9590}
9691
9792// newLevelDBDatabase creates a persistent key-value database without a freezer
@@ -107,8 +102,8 @@ func newLevelDBDatabase(file string, cache int, handles int, namespace string, r
107102
108103// newPebbleDBDatabase creates a persistent key-value database without a freezer
109104// moving immutable chain segments into cold storage.
110- func newPebbleDBDatabase (file string , cache int , handles int , namespace string , readonly bool , ephemeral bool ) (ethdb.Database , error ) {
111- db , err := pebble .New (file , cache , handles , namespace , readonly , ephemeral )
105+ func newPebbleDBDatabase (file string , cache int , handles int , namespace string , readonly bool ) (ethdb.Database , error ) {
106+ db , err := pebble .New (file , cache , handles , namespace , readonly )
112107 if err != nil {
113108 return nil , err
114109 }
0 commit comments