Skip to content

Commit

Permalink
Remove unused journal types
Browse files Browse the repository at this point in the history
  • Loading branch information
drklee3 committed Jan 19, 2024
1 parent a929c30 commit d8069a0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 16 deletions.
2 changes: 1 addition & 1 deletion x/evm/statedb/access_list.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ func (al *accessList) Contains(address common.Address, slot common.Hash) (addres
return true, slotPresent
}

// newaccessListOld creates a new accessListOld.
// newAccessList creates a new newAccessList.
func newAccessList() *accessList {
return &accessList{
addresses: make(map[common.Address]int),
Expand Down
14 changes: 0 additions & 14 deletions x/evm/statedb/journal.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,20 +93,6 @@ func (j *journal) length() int {
}

type (
// Changes to the account trie.
createObjectChange struct {
account *common.Address
}
resetObjectChange struct {
prev *stateObject
}

// Changes to other state values.
refundChange struct {
prev uint64
}
addLogChange struct{}

// Changes to the access list
accessListAddAccountChange struct {
address *common.Address
Expand Down
4 changes: 3 additions & 1 deletion x/evm/statedb/statedb.go
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ func (s *StateDB) RevertToSnapshot(revid int) {

// the StateDB object should be discarded after committed.
func (s *StateDB) Commit() error {
// Delete suicided accounts
// Delete suicided accounts -- these still need to be committed
suicidedAddrs := s.ephemeralStore.GetAllSuicided(s.ctx.CurrentCtx())
for _, addr := range suicidedAddrs {
// Balance is also cleared as part of Keeper.DeleteAccount
Expand All @@ -416,5 +416,7 @@ func (s *StateDB) Commit() error {
// Commit after account deletions
s.ctx.Commit()

// Journal only contains non-state content, so nothing to commit.

return nil
}

0 comments on commit d8069a0

Please sign in to comment.