From fec21d6c958264ff5ff729c0c91e4a882aecc23b Mon Sep 17 00:00:00 2001 From: Determinant Date: Wed, 16 Sep 2020 00:39:05 -0400 Subject: add lists to keep track of actually hacked files --- core/state/journal.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'core/state/journal.go') diff --git a/core/state/journal.go b/core/state/journal.go index 6e85173..cfa1a4a 100644 --- a/core/state/journal.go +++ b/core/state/journal.go @@ -90,7 +90,8 @@ type ( account *common.Address } resetObjectChange struct { - prev *stateObject + prev *stateObject + prevdestruct bool } suicideChange struct { account *common.Address @@ -130,9 +131,7 @@ type ( hash common.Hash } touchChange struct { - account *common.Address - prev bool - prevDirty bool + account *common.Address } ) @@ -147,6 +146,9 @@ func (ch createObjectChange) dirtied() *common.Address { func (ch resetObjectChange) revert(s *StateDB) { s.setStateObject(ch.prev) + if !ch.prevdestruct && s.snap != nil { + delete(s.snapDestructs, ch.prev.addrHash) + } } func (ch resetObjectChange) dirtied() *common.Address { -- cgit v1.2.3 From 8478802ddacc027a8d8c866da9365f6739d9d9d4 Mon Sep 17 00:00:00 2001 From: Determinant Date: Wed, 16 Sep 2020 18:26:55 -0400 Subject: ... --- core/state/journal.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core/state/journal.go') diff --git a/core/state/journal.go b/core/state/journal.go index cfa1a4a..0cc556b 100644 --- a/core/state/journal.go +++ b/core/state/journal.go @@ -19,7 +19,7 @@ package state import ( "math/big" - "github.com/ava-labs/go-ethereum/common" + "github.com/ethereum/go-ethereum/common" ) // journalEntry is a modification entry in the state change journal that can be -- cgit v1.2.3