chore!(triedb): remove config argument for DBConstructor (#167)

This commit is contained in:
Quentin McGaw 2025-03-25 11:22:59 +01:00 committed by GitHub
parent 7be6bee7ab
commit 87a2d57b96
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

View file

@ -42,7 +42,7 @@ type ReaderProvider interface {
}
// A DBConstructor constructs alternative backend-database implementations.
type DBConstructor func(ethdb.Database, *Config) DBOverride
type DBConstructor func(ethdb.Database) DBOverride
// A DBOverride is an arbitrary implementation of a [Database] backend. It MUST
// be either a [HashDB] or a [PathDB].
@ -59,7 +59,7 @@ func (db *Database) overrideBackend(diskdb ethdb.Database, config *Config) bool
log.Crit("Database override provided when 'hash' or 'path' mode are configured")
}
db.backend = config.DBOverride(diskdb, config)
db.backend = config.DBOverride(diskdb)
switch db.backend.(type) {
case HashDB:
case PathDB:

View file

@ -28,7 +28,7 @@ import (
func TestDBOverride(t *testing.T) {
config := &Config{
DBOverride: func(d ethdb.Database, c *Config) DBOverride {
DBOverride: func(d ethdb.Database) DBOverride {
return override{}
},
}