mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-24 13:46:43 +00:00
core/sate: Commit return StateUpdate
Signed-off-by: jsvisa <delweng@gmail.com>
This commit is contained in:
parent
239318c841
commit
6cf163442c
1 changed files with 3 additions and 3 deletions
|
|
@ -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
|
// 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
|
// no empty accounts left that could be deleted by EIP-158, storage wiping
|
||||||
// should not occur.
|
// 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)
|
ret, err := s.commitAndFlush(block, deleteEmptyObjects, noStorageWiping)
|
||||||
if err != nil {
|
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.
|
// Prepare handles the preparatory steps for executing a state transition with.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue