From 6cf163442c08eaff06b3ec0dcee267d1786130f9 Mon Sep 17 00:00:00 2001 From: jsvisa Date: Wed, 28 May 2025 12:04:45 +0800 Subject: [PATCH] core/sate: Commit return StateUpdate 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 b8f3e9d591..1f58aa3e08 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) (common.Hash, error) { +func (s *StateDB) Commit(block uint64, deleteEmptyObjects bool, noStorageWiping bool) (*StateUpdate, error) { ret, err := s.commitAndFlush(block, deleteEmptyObjects, noStorageWiping) if err != nil { - return common.Hash{}, err + return nil, err } - return ret.Root, nil + return ret, nil } // Prepare handles the preparatory steps for executing a state transition with.