mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 10:22:23 +00:00
core/state: check db error after intermediate call
This commit is contained in:
parent
79d2327771
commit
1fbe272ae4
1 changed files with 4 additions and 0 deletions
|
|
@ -1172,6 +1172,10 @@ func (s *StateDB) commit(deleteEmptyObjects bool) (*stateUpdate, error) {
|
|||
// Finalize any pending changes and merge everything into the tries
|
||||
s.IntermediateRoot(deleteEmptyObjects)
|
||||
|
||||
// Short circuit if any error occurs within the IntermediateRoot.
|
||||
if s.dbErr != nil {
|
||||
return nil, fmt.Errorf("commit aborted due to database error: %v", s.dbErr)
|
||||
}
|
||||
// Commit objects to the trie, measuring the elapsed time
|
||||
var (
|
||||
accountTrieNodesUpdated int
|
||||
|
|
|
|||
Loading…
Reference in a new issue