From fadf28c4b5e35f08c67364337698dc61839fea53 Mon Sep 17 00:00:00 2001 From: philip-morlier Date: Fri, 15 Sep 2023 12:11:14 -0700 Subject: [PATCH] Added condition into statedb.go to enable native geth tests to pass. --- core/state/statedb.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/core/state/statedb.go b/core/state/statedb.go index 060c8f160..05061107d 100644 --- a/core/state/statedb.go +++ b/core/state/statedb.go @@ -962,6 +962,11 @@ func (s *StateDB) clearJournalAndRefund() { // storage iteration and constructs trie node deletion markers by creating // stack trie with iterated slots. func (s *StateDB) fastDeleteStorage(addrHash common.Hash, root common.Hash) (bool, common.StorageSize, map[common.Hash][]byte, *trienode.NodeSet, error) { + // begin PluGeth Injection // this injection is neccessary to enable the native geth tests in core/state to pass + if _, err := s.snap.Account(addrHash); err != nil { + return false, 0, nil, nil, err + } + // end PluGeth Injection iter, err := s.snaps.StorageIterator(s.originalRoot, addrHash, common.Hash{}) if err != nil { return false, 0, nil, nil, err