From 7275aa8f617f41248af0f79eefab8cf0a154d62d Mon Sep 17 00:00:00 2001 From: Jared Wasinger Date: Mon, 27 Oct 2025 17:48:30 +0800 Subject: [PATCH] fix lint --- core/state/statedb.go | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/core/state/statedb.go b/core/state/statedb.go index 1bc6265528..086ab289c9 100644 --- a/core/state/statedb.go +++ b/core/state/statedb.go @@ -566,20 +566,9 @@ func (s *StateDB) GetTransientState(addr common.Address, key common.Hash) common // Setting, updating & deleting state object methods. // -// updateStateObject writes the given object to the trie. -func (s *StateDB) updateStateObject(obj *stateObject) { - // Encode the account and update the account trie - if err := s.trie.UpdateAccount(obj.Address(), &obj.data, len(obj.code)); err != nil { - s.setError(fmt.Errorf("updateStateObject (%x) error: %v", obj.Address(), err)) - } - if obj.dirtyCode { - s.trie.UpdateContractCode(obj.Address(), common.BytesToHash(obj.CodeHash()), obj.code) - } -} - // updateStateObject writes the given object to the trie. The actual value is // only resolved from the provided function when it is needed during trie hashing. -func (s *StateDB) updateStateObjectAsync(addr common.Address, resolver func() (*types.StateAccount, int)) { +func (s *StateDB) updateStateObject(addr common.Address, resolver func() (*types.StateAccount, int)) { if err := s.trie.UpdateAccountAsync(addr, resolver); err != nil { s.setError(fmt.Errorf("updateStateObject (%x) error: %v", addr, err)) } @@ -960,7 +949,7 @@ func (s *StateDB) IntermediateRoot(deleteEmptyObjects bool) common.Hash { if op.isDelete() { deletedAddrs = append(deletedAddrs, addr) } else { - s.updateStateObjectAsync(addr, stateObjectsResolve[addr]) + s.updateStateObject(addr, stateObjectsResolve[addr]) s.AccountUpdated += 1 } usedAddrs = append(usedAddrs, addr) // Copy needed for closure