Skip to content

Commit

Permalink
chore: change panic to log
Browse files Browse the repository at this point in the history
  • Loading branch information
joeylichang committed Aug 13, 2024
1 parent b00582c commit 5d0eec2
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions core/state/caching_versa_db.go
Original file line number Diff line number Diff line change
Expand Up @@ -325,8 +325,7 @@ func (vt *VersaTree) Hash() common.Hash {
hash, err := vt.db.CalcRootHash(vt.handler)
if err != nil {
// TODO:: debug code, will be change to log error
log.Info("calc tree root hash", "tree handler info", vt.db.ParseTreeHandler(vt.handler))
panic(fmt.Sprintf("failed to cacl versa tree hash, handler: %d, error: %s", vt.handler, err.Error()))
log.Crit("calc tree root hash", "tree handler info", vt.db.ParseTreeHandler(vt.handler), "error", err.Error())
}
return hash
}
Expand Down

0 comments on commit 5d0eec2

Please sign in to comment.