diff --git a/core/state/statedb.go b/core/state/statedb.go index 58f812ce5b..574eb114ba 100644 --- a/core/state/statedb.go +++ b/core/state/statedb.go @@ -175,7 +175,6 @@ func New(root common.Hash, db Database, snaps *snapshot.Tree) (*StateDB, error) if db.Scheme() == rawdb.VersionScheme && snaps != nil { panic("statedb snapshot must be nil in version db.") } - log.Info("new statedb with type", "scheme", db.Scheme()) // clean up previous traces db.Reset() diff --git a/triedb/hashdb/database.go b/triedb/hashdb/database.go index ac74ba4aed..d8104b15da 100644 --- a/triedb/hashdb/database.go +++ b/triedb/hashdb/database.go @@ -20,6 +20,7 @@ import ( "errors" "fmt" "reflect" + "runtime/debug" "sync" "time" @@ -139,6 +140,9 @@ func New(diskdb ethdb.Database, config *Config, resolver ChildResolver) *Databas if config.CleanCacheSize > 0 { cleans = fastcache.New(config.CleanCacheSize) } + log.Info("==========hash triedb==========") + log.Info(string(debug.Stack())) + log.Info("===============================") log.Info("success to init hash mode triedb") return &Database{ diskdb: diskdb, diff --git a/triedb/pathdb/database.go b/triedb/pathdb/database.go index c3608ab405..7aeda4db9b 100644 --- a/triedb/pathdb/database.go +++ b/triedb/pathdb/database.go @@ -21,6 +21,7 @@ import ( "fmt" "io" "os" + "runtime/debug" "sort" "strconv" "sync" @@ -226,6 +227,9 @@ func New(diskdb ethdb.Database, config *Config) *Database { log.Crit("Failed to disable database", "err", err) // impossible to happen } } + log.Info("==========path triedb==========") + log.Info(string(debug.Stack())) + log.Info("===============================") log.Info("success to init path mode triedb") return db } diff --git a/triedb/versiondb/versadb.go b/triedb/versiondb/versadb.go index 657fa40194..72226ecf15 100644 --- a/triedb/versiondb/versadb.go +++ b/triedb/versiondb/versadb.go @@ -1,6 +1,8 @@ package versiondb import ( + "runtime/debug" + versa "github.com/bnb-chain/versioned-state-database" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/rawdb" @@ -41,6 +43,9 @@ func New(config *Config) *VersionDB { v := &VersionDB{ db: db, } + log.Info("==========version triedb==========") + log.Info(string(debug.Stack())) + log.Info("===============================") log.Info("success to init version mode triedb") return v }