Skip to content

Commit

Permalink
add logs to debug shadowfork
Browse files Browse the repository at this point in the history
  • Loading branch information
gballet committed Mar 26, 2024
1 parent ff36168 commit a641947
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions core/state/database.go
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,7 @@ func (db *cachingDB) SaveTransitionState(root common.Hash) {
// it has been saved.
db.TransitionStatePerRoot[root] = db.CurrentTransitionState.Copy()

log.Debug("saving transition state", "storage processed", db.CurrentTransitionState.StorageProcessed, "addr", db.CurrentTransitionState.CurrentAccountAddress, "slot hash", db.CurrentTransitionState.CurrentSlotHash, "root", root, "ended", db.CurrentTransitionState.ended, "started", db.CurrentTransitionState.started)
fmt.Println("saving transition state", "storage processed", db.CurrentTransitionState.StorageProcessed, "addr", db.CurrentTransitionState.CurrentAccountAddress, "slot hash", db.CurrentTransitionState.CurrentSlotHash, "root", root, "ended", db.CurrentTransitionState.ended, "started", db.CurrentTransitionState.started)
}
}

Expand All @@ -566,7 +566,7 @@ func (db *cachingDB) LoadTransitionState(root common.Hash) {
// as a verkle database.
ts, ok := db.TransitionStatePerRoot[root]
if !ok || ts == nil {
log.Debug("could not find any transition state, starting with a fresh state", "is verkle", db.triedb.IsVerkle())
fmt.Println("could not find any transition state, starting with a fresh state", "is verkle", db.triedb.IsVerkle())
// Start with a fresh state
ts = &TransitionState{ended: false}
}
Expand All @@ -575,5 +575,5 @@ func (db *cachingDB) LoadTransitionState(root common.Hash) {
// doesn't get overwritten.
db.CurrentTransitionState = ts.Copy()

log.Debug("loaded transition state", "storage processed", db.CurrentTransitionState.StorageProcessed, "addr", db.CurrentTransitionState.CurrentAccountAddress, "slot hash", db.CurrentTransitionState.CurrentSlotHash, "root", root, "ended", db.CurrentTransitionState.ended, "started", db.CurrentTransitionState.started)
fmt.Println("loaded transition state", "storage processed", db.CurrentTransitionState.StorageProcessed, "addr", db.CurrentTransitionState.CurrentAccountAddress, "slot hash", db.CurrentTransitionState.CurrentSlotHash, "root", root, "ended", db.CurrentTransitionState.ended, "started", db.CurrentTransitionState.started)
}

0 comments on commit a641947

Please sign in to comment.