@@ -566,20 +566,9 @@ func (s *StateDB) GetTransientState(addr common.Address, key common.Hash) common
566566// Setting, updating & deleting state object methods. 
567567// 
568568
569- // updateStateObject writes the given object to the trie. 
570- func  (s  * StateDB ) updateStateObject (obj  * stateObject ) {
571- 	// Encode the account and update the account trie 
572- 	if  err  :=  s .trie .UpdateAccount (obj .Address (), & obj .data , len (obj .code )); err  !=  nil  {
573- 		s .setError (fmt .Errorf ("updateStateObject (%x) error: %v" , obj .Address (), err ))
574- 	}
575- 	if  obj .dirtyCode  {
576- 		s .trie .UpdateContractCode (obj .Address (), common .BytesToHash (obj .CodeHash ()), obj .code )
577- 	}
578- }
579- 
580569// updateStateObject writes the given object to the trie.  The actual value is 
581570// only resolved from the provided function when it is needed during trie hashing. 
582- func  (s  * StateDB ) updateStateObjectAsync (addr  common.Address , resolver  func () (* types.StateAccount , int )) {
571+ func  (s  * StateDB ) updateStateObject (addr  common.Address , resolver  func () (* types.StateAccount , int )) {
583572	if  err  :=  s .trie .UpdateAccountAsync (addr , resolver ); err  !=  nil  {
584573		s .setError (fmt .Errorf ("updateStateObject (%x) error: %v" , addr , err ))
585574	}
@@ -960,7 +949,7 @@ func (s *StateDB) IntermediateRoot(deleteEmptyObjects bool) common.Hash {
960949		if  op .isDelete () {
961950			deletedAddrs  =  append (deletedAddrs , addr )
962951		} else  {
963- 			s .updateStateObjectAsync (addr , stateObjectsResolve [addr ])
952+ 			s .updateStateObject (addr , stateObjectsResolve [addr ])
964953			s .AccountUpdated  +=  1 
965954		}
966955		usedAddrs  =  append (usedAddrs , addr ) // Copy needed for closure 
0 commit comments