From fc915406d6aa0506f150ded8e0f5e7686a2b5a79 Mon Sep 17 00:00:00 2001 From: jsvisa Date: Wed, 28 May 2025 12:33:45 +0800 Subject: [PATCH] Revert "core/sate: Commit return StateUpdate" This reverts commit 9c51e774352a8792f2fb187a5dc5b390b046249e. Signed-off-by: jsvisa --- core/state/statedb.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/state/statedb.go b/core/state/statedb.go index 1f58aa3e08..b8f3e9d591 100644 --- a/core/state/statedb.go +++ b/core/state/statedb.go @@ -1348,12 +1348,12 @@ func (s *StateDB) commitAndFlush(block uint64, deleteEmptyObjects bool, noStorag // Since self-destruction was deprecated with the Cancun fork and there are // no empty accounts left that could be deleted by EIP-158, storage wiping // should not occur. -func (s *StateDB) Commit(block uint64, deleteEmptyObjects bool, noStorageWiping bool) (*StateUpdate, error) { +func (s *StateDB) Commit(block uint64, deleteEmptyObjects bool, noStorageWiping bool) (common.Hash, error) { ret, err := s.commitAndFlush(block, deleteEmptyObjects, noStorageWiping) if err != nil { - return nil, err + return common.Hash{}, err } - return ret, nil + return ret.Root, nil } // Prepare handles the preparatory steps for executing a state transition with.