code: def atlasdb_get_lastblock( con=None, path=None ):
      
      row = None
      with AtlasDBOpen(con=con, path=path) as dbcon:
  
          sql = "SELECT MAX(block_height) FROM zonefiles;"
          args = ()
  
          cur = dbcon.cursor()
          res = atlasdb_query_execute( cur, sql, args )
  
          row = {}
          for r in res:
              row.update(r)
              break
  
      return row['MAX(block_height)']
docs: Get the highest block height in the atlas db