code: def atlasdb_sync_zonefiles( db, start_block, zonefile_dir, atlas_state, validate=True, end_block=None, path=None, con=None ):
      
      ret = None
      with AtlasDBOpen(con=con, path=path) as dbcon:
          ret = atlasdb_queue_zonefiles( dbcon, db, start_block, zonefile_dir, validate=validate, end_block=end_block )
          atlasdb_cache_zonefile_info( con=dbcon )
  
      if atlas_state:
          # it could have been the case that a zone file we already have was re-announced.
          # if so, then inform any storage listeners in the crawler thread that this has happened
          # (such as the subdomain system).
          crawler_thread = atlas_state['zonefile_crawler']
          for zfinfo in filter(lambda zfi: zfi['present'], ret):
              log.debug('Store re-discovered zonefile {} at {}'.format(zfinfo['zonefile_hash'], zfinfo['block_height']))
              crawler_thread.store_zonefile_cb(zfinfo['zonefile_hash'], zfinfo['block_height'])
  
      return ret
docs: Synchronize atlas DB with name db
  
      NOT THREAD SAFE