diff --git a/core/state/database.go b/core/state/database.go index 2ab4247900..c7e9e2a90b 100644 --- a/core/state/database.go +++ b/core/state/database.go @@ -61,9 +61,6 @@ type Database interface { // ContractCodeSize retrieves a particular contracts code's size. ContractCodeSize(addr common.Address, codeHash common.Hash) (int, error) - // DiskDB returns the underlying key-value disk database. - DiskDB() ethdb.KeyValueStore - // PointCache returns the cache holding points used in verkle tree key computation PointCache() *utils.PointCache @@ -273,11 +270,6 @@ func (db *CachingDB) ContractCodeSize(addr common.Address, codeHash common.Hash) return len(code), err } -// DiskDB returns the underlying key-value disk database. -func (db *CachingDB) DiskDB() ethdb.KeyValueStore { - return db.disk -} - // TrieDB retrieves any intermediate trie-node caching layer. func (db *CachingDB) TrieDB() *triedb.Database { return db.triedb diff --git a/core/state/statedb.go b/core/state/statedb.go index 1c425802a0..1a12f519a4 100644 --- a/core/state/statedb.go +++ b/core/state/statedb.go @@ -1254,7 +1254,7 @@ func (s *StateDB) commitAndFlush(block uint64, deleteEmptyObjects bool) (*stateU return nil, err } // Commit dirty contract code if any exists - if db := s.db.DiskDB(); db != nil && len(ret.codes) > 0 { + if db := s.db.TrieDB().Disk(); db != nil && len(ret.codes) > 0 { batch := db.NewBatch() for _, code := range ret.codes { rawdb.WriteCode(batch, code.hash, code.blob)