From cad1e3ec38915b1d25e003276e11ceab16829bf6 Mon Sep 17 00:00:00 2001 From: joeylichang Date: Tue, 17 Sep 2024 08:59:54 +0800 Subject: [PATCH] feat: return state object trie for no update --- core/state/state_object.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/core/state/state_object.go b/core/state/state_object.go index cb385623bb..37d5168d1d 100644 --- a/core/state/state_object.go +++ b/core/state/state_object.go @@ -398,6 +398,11 @@ func (s *stateObject) updateTrie() (Trie, error) { s.db.setError(err) return nil, err } + + if len(s.pendingStorage) == 0 { + return s.trie, nil + } + // Insert all the pending storage updates into the trie usedStorage := make([][]byte, 0, len(s.pendingStorage)) dirtyStorage := make(map[common.Hash][]byte)