Skip to content

Commit

Permalink
log incarnation
Browse files Browse the repository at this point in the history
  • Loading branch information
yperbasis committed Nov 14, 2023
1 parent bac9c5a commit f8d3fa6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions core/state/change_set_writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ func accountsEqual(a1, a2 *accounts.Account) bool {

func (w *ChangeSetWriter) UpdateAccountData(address libcommon.Address, original, account *accounts.Account) error {
if TraceLog {
fmt.Printf("balance,%x,%d\n", address, &account.Balance)
fmt.Printf("account,%x,%d,%d,%d\n", address, account.Nonce, &account.Balance, account.Incarnation)
}
if !accountsEqual(original, account) || w.storageChanged[address] {
w.accountChanges[address] = originalAccountData(original, true /*omitHashes*/)
Expand All @@ -100,7 +100,7 @@ func (w *ChangeSetWriter) UpdateAccountData(address libcommon.Address, original,

func (w *ChangeSetWriter) UpdateAccountCode(address libcommon.Address, incarnation uint64, codeHash libcommon.Hash, code []byte) error {
if TraceLog {
fmt.Printf("code,%x,%x\n", address, code)
fmt.Printf("code,%x,%d,%x\n", address, incarnation, code)
}
return nil
}
Expand All @@ -118,7 +118,7 @@ func (w *ChangeSetWriter) DeleteAccount(address libcommon.Address, original *acc

func (w *ChangeSetWriter) WriteAccountStorage(address libcommon.Address, incarnation uint64, key *libcommon.Hash, original, value *uint256.Int) error {
if TraceLog {
fmt.Printf("storage,%x,%x,%x\n", address, *key, value.Bytes())
fmt.Printf("storage,%x,%d,%x,%x\n", address, incarnation, *key, value.Bytes())
}
if *original == *value {
return nil
Expand Down

0 comments on commit f8d3fa6

Please sign in to comment.