Skip to content

Commit

Permalink
chore: delete debug code and add log
Browse files Browse the repository at this point in the history
  • Loading branch information
joeylichang committed Aug 12, 2024
1 parent 6b7c807 commit 66bd590
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
1 change: 1 addition & 0 deletions core/genesis.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ func hashAlloc(ga *types.GenesisAlloc, isVerkle bool) (common.Hash, error) {
// Create an ephemeral in-memory database for computing hash,
// all the derived states will be discarded to not pollute disk.
db := state.NewDatabaseWithConfig(rawdb.NewMemoryDatabase(), config, true)
log.Info("genesis calc root hash use hash mode triedb")
statedb, err := state.New(types.EmptyRootHash, db, nil)
if err != nil {
return common.Hash{}, err
Expand Down
3 changes: 1 addition & 2 deletions triedb/hashdb/database.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,7 @@ func New(diskdb ethdb.Database, config *Config, resolver ChildResolver) *Databas
if config.CleanCacheSize > 0 {
cleans = fastcache.New(config.CleanCacheSize)
}
// TODO:: debug code
panic("success to init hash mode triedb")
log.Info("success to init hash mode triedb")
return &Database{
diskdb: diskdb,
resolver: resolver,
Expand Down
3 changes: 1 addition & 2 deletions triedb/pathdb/database.go
Original file line number Diff line number Diff line change
Expand Up @@ -226,8 +226,7 @@ func New(diskdb ethdb.Database, config *Config) *Database {
log.Crit("Failed to disable database", "err", err) // impossible to happen
}
}
// TODO:: debug code
panic("success to init path mode triedb")
log.Info("success to init path mode triedb")
return db
}

Expand Down

0 comments on commit 66bd590

Please sign in to comment.