Skip to content

Commit

Permalink
fix: update logs
Browse files Browse the repository at this point in the history
  • Loading branch information
VM committed May 28, 2024
1 parent 78e6b5d commit 3eb0cf8
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions core/rawdb/database.go
Original file line number Diff line number Diff line change
Expand Up @@ -319,10 +319,7 @@ func NewDatabase(db ethdb.KeyValueStore) ethdb.Database {
}

type emptyfreezedb struct {
ethdb.KeyValueStore
diffStore ethdb.KeyValueStore
stateStore ethdb.Database
blockStore ethdb.Database
nofreezedb
}

// HasAncient returns nil for pruned db that we don't have a backing chain freezer.
Expand Down Expand Up @@ -421,7 +418,7 @@ func (db *emptyfreezedb) SetupFreezerEnv(env *ethdb.FreezerEnv) error {
// have a backing chain freezer.
// WARNING: it must be only used in the above case.
func NewEmptyFreezeDB(db ethdb.KeyValueStore) ethdb.Database {
return &emptyfreezedb{KeyValueStore: db}
return &emptyfreezedb{nofreezedb{KeyValueStore: db}}
}

// NewFreezerDb only create a freezer without statedb.
Expand Down Expand Up @@ -475,7 +472,7 @@ func NewDatabaseWithFreezer(db ethdb.KeyValueStore, ancient string, namespace st

// This case is used for someone who wants to execute geth db inspect CLI in a pruned db
if !disableFreeze && readonly && ReadAncientType(db) == PruneFreezerType {
log.Warn("Disk db is pruned, return an empty freezer db which is used for CLI")
log.Warn("Disk db is pruned, using an empty freezer db for CLI")
return NewEmptyFreezeDB(db), nil
}

Expand Down

0 comments on commit 3eb0cf8

Please sign in to comment.