code: func (s *StateDB) Finalise(deleteEmptyObjects bool) {
  	for addr := range s.journal.dirties {
  		stateObject, exist := s.stateObjects[addr]
  		if !exist {
  			// ripeMD is 'touched' at block 1714175, in tx 0x1237f737031e40bcde4a8b7e717b2d15e3ecadfe49bb1bbc71ee9deb09c6fcf2
  			// That tx goes out of gas, and although the notion of 'touched' does not exist there, the
  			// touch-event will still be recorded in the journal. Since ripeMD is a special snowflake,
  			// it will persist in the journal even though the journal is reverted. In this special circumstance,
  			// it may exist in `s.journal.dirties` but not in `s.stateObjects`.
  			// Thus, we can safely ignore it here
  			continue
  		}
  
  		if stateObject.suicided || (deleteEmptyObjects && stateObject.empty()) {
  			s.deleteStateObject(stateObject)
  		} else {
  			stateObject.updateRoot(s.db)
  			s.updateStateObject(stateObject)
  		}
  		s.stateObjectsDirty[addr] = struct{}{}
  	}
  	// Invalidate journal because reverting across transactions is not allowed.
  	s.clearJournalAndRefund()
  }
docs: // Finalise finalises the state by removing the self destructed objects
  // and clears the journal as well as the refunds.