From 66bd59013f8703df1740f2c5dea3ee08ba6d45df Mon Sep 17 00:00:00 2001 From: joeycli Date: Mon, 12 Aug 2024 18:20:27 +0800 Subject: [PATCH] chore: delete debug code and add log --- core/genesis.go | 1 + triedb/hashdb/database.go | 3 +-- triedb/pathdb/database.go | 3 +-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/core/genesis.go b/core/genesis.go index 7418aacafd..72db9955ee 100644 --- a/core/genesis.go +++ b/core/genesis.go @@ -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 diff --git a/triedb/hashdb/database.go b/triedb/hashdb/database.go index 461a54188a..ac74ba4aed 100644 --- a/triedb/hashdb/database.go +++ b/triedb/hashdb/database.go @@ -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, diff --git a/triedb/pathdb/database.go b/triedb/pathdb/database.go index c3352f19af..c3608ab405 100644 --- a/triedb/pathdb/database.go +++ b/triedb/pathdb/database.go @@ -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 }