feat(triedb): expose backend for custom use (#183)

## Why this should be merged

To override the standard trie behavior for custom databases in
`core/state/database.go`, custom methods may need to be defined on the
backend database.

## How this works

Exposes `backend` interface for the API

## How this was tested

No tests necessary - isn't used in `libevm`.
This commit is contained in:
Austin Larson 2025-05-30 14:29:56 -04:00 committed by GitHub
parent 2d94327f8d
commit 7342b55267
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -51,6 +51,11 @@ type DBOverride interface {
ReaderProvider
}
// Backend returns the underlying backend of the trie database.
func (db *Database) Backend() BackendDB {
return db.backend
}
func (db *Database) overrideBackend(diskdb ethdb.Database, config *Config) bool {
if config.DBOverride == nil {
return false