Skip to content

Commit

Permalink
chore: add stack debug
Browse files Browse the repository at this point in the history
  • Loading branch information
joeylichang committed Aug 12, 2024
1 parent 66bd590 commit a8cf691
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions triedb/hashdb/database.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import (
"errors"
"fmt"
"reflect"
"runtime/debug"
"sync"
"time"

Expand Down Expand Up @@ -139,6 +140,7 @@ func New(diskdb ethdb.Database, config *Config, resolver ChildResolver) *Databas
if config.CleanCacheSize > 0 {
cleans = fastcache.New(config.CleanCacheSize)
}
log.Info("hash triedb", "stack: ", debug.Stack())
log.Info("success to init hash mode triedb")
return &Database{
diskdb: diskdb,
Expand Down
2 changes: 2 additions & 0 deletions triedb/pathdb/database.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import (
"fmt"
"io"
"os"
"runtime/debug"
"sort"
"strconv"
"sync"
Expand Down Expand Up @@ -226,6 +227,7 @@ func New(diskdb ethdb.Database, config *Config) *Database {
log.Crit("Failed to disable database", "err", err) // impossible to happen
}
}
log.Info("path triedb", "stack: ", debug.Stack())
log.Info("success to init path mode triedb")
return db
}
Expand Down
3 changes: 3 additions & 0 deletions triedb/versiondb/versadb.go
Original file line number Diff line number Diff line change
@@ -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"
Expand Down Expand Up @@ -41,6 +43,7 @@ func New(config *Config) *VersionDB {
v := &VersionDB{
db: db,
}
log.Info("path triedb", "stack: ", debug.Stack())
log.Info("success to init version mode triedb")
return v
}
Expand Down

0 comments on commit a8cf691

Please sign in to comment.