def atlasdb_get_zonefiles_by_block( from_block, to_block, offset, count, name=None, con=None, path=None ):
    """
    Look up all zonefile hashes in a block range.  Optionally filter by name.
    Returns [{'name': ..., 'zonefile_hash': ..., 'block_height': ..., 'txid': ..., 'inv_index': ...}]
    """
    ret = None

    if count > 100:
        return {'error' : 'Count must be less than 100'}

    with AtlasDBOpen(con=con, path=path) as dbcon:

        sql = 'SELECT name,zonefile_hash,txid,block_height,inv_index FROM zonefiles WHERE block_height >= ? AND block_height <= ?'
        args = (from_block, to_block)

        if name:
            sql += ' AND name = ?'
            args += (name,)

        sql += 'ORDER BY inv_index LIMIT ? OFFSET ?;'
        args += (count, offset)

        cur = dbcon.cursor()
        res = atlasdb_query_execute( cur, sql, args )

        ret = []

        for zfinfo in res:
            ret.append({
                'name' : zfinfo['name'],
                'zonefile_hash' : zfinfo['zonefile_hash'],
                'block_height' : zfinfo['block_height'],
                'txid' : zfinfo['txid'],
                'inv_index': zfinfo['inv_index'],
            })

    return ret
def atlasdb_get_zonefiles_by_block ( from_block , to_block , offset , count , name = None , con = None , path = None ) : ret = None if count > 100 : return { 'error' : 'Count must be less than 100' } with AtlasDBOpen ( con = con , path = path ) as dbcon : sql = 'SELECT name,zonefile_hash,txid,block_height,inv_index FROM zonefiles WHERE block_height >= ? AND block_height <= ?' args = ( from_block , to_block ) if name : sql += ' AND name = ?' args += ( name , ) sql += 'ORDER BY inv_index LIMIT ? OFFSET ?;' args += ( count , offset ) cur = dbcon . cursor ( ) res = atlasdb_query_execute ( cur , sql , args ) ret = [ ] for zfinfo in res : ret . append ( { 'name' : zfinfo [ 'name' ] , 'zonefile_hash' : zfinfo [ 'zonefile_hash' ] , 'block_height' : zfinfo [ 'block_height' ] , 'txid' : zfinfo [ 'txid' ] , 'inv_index' : zfinfo [ 'inv_index' ] , } ) return ret
Look up all zonefile hashes in a block range.  Optionally filter by name.
    Returns [{'name': ..., 'zonefile_hash': ..., 'block_height': ..., 'txid': ..., 'inv_index': ...}]