Skip to content

Commit 7342b55

Browse files
authored
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`.
1 parent 2d94327 commit 7342b55

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

triedb/database.libevm.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,11 @@ type DBOverride interface {
5151
ReaderProvider
5252
}
5353

54+
// Backend returns the underlying backend of the trie database.
55+
func (db *Database) Backend() BackendDB {
56+
return db.backend
57+
}
58+
5459
func (db *Database) overrideBackend(diskdb ethdb.Database, config *Config) bool {
5560
if config.DBOverride == nil {
5661
return false

0 commit comments

Comments
 (0)