Skip to content

Commit a8cf691

Browse files
committed
chore: add stack debug
1 parent 66bd590 commit a8cf691

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

triedb/hashdb/database.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import (
2020
"errors"
2121
"fmt"
2222
"reflect"
23+
"runtime/debug"
2324
"sync"
2425
"time"
2526

@@ -139,6 +140,7 @@ func New(diskdb ethdb.Database, config *Config, resolver ChildResolver) *Databas
139140
if config.CleanCacheSize > 0 {
140141
cleans = fastcache.New(config.CleanCacheSize)
141142
}
143+
log.Info("hash triedb", "stack: ", debug.Stack())
142144
log.Info("success to init hash mode triedb")
143145
return &Database{
144146
diskdb: diskdb,

triedb/pathdb/database.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import (
2121
"fmt"
2222
"io"
2323
"os"
24+
"runtime/debug"
2425
"sort"
2526
"strconv"
2627
"sync"
@@ -226,6 +227,7 @@ func New(diskdb ethdb.Database, config *Config) *Database {
226227
log.Crit("Failed to disable database", "err", err) // impossible to happen
227228
}
228229
}
230+
log.Info("path triedb", "stack: ", debug.Stack())
229231
log.Info("success to init path mode triedb")
230232
return db
231233
}

triedb/versiondb/versadb.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
package versiondb
22

33
import (
4+
"runtime/debug"
5+
46
versa "github.com/bnb-chain/versioned-state-database"
57
"github.com/ethereum/go-ethereum/common"
68
"github.com/ethereum/go-ethereum/core/rawdb"
@@ -41,6 +43,7 @@ func New(config *Config) *VersionDB {
4143
v := &VersionDB{
4244
db: db,
4345
}
46+
log.Info("path triedb", "stack: ", debug.Stack())
4447
log.Info("success to init version mode triedb")
4548
return v
4649
}

0 commit comments

Comments
 (0)