def block_locator_hashes(self):

        # Find the height of the block chain
        hashes = [ ]

        # First 10...
        offset = 0
        cursor = self._cursor()
        cursor.execute('select hash, height from blocks where mainchain = 1 and height > 0 order by height desc limit 10')
        rows = cursor.fetchall()
        hashes.extend([str(hash) for (hash, offset) in rows])
        offset -= 1

        # ...then step down by twice the previous step...
        if offset > 0:
            for i in xrange(1, int(math.log(2 * offset, 2))):
                if offset <= 1: break
                cursor.execute('select hash from blocks where mainchain = 1 and height = ?', (offset, ))
                hashes.append(str(cursor.fetchone()[0]))
                offset -= (1 << i)

        # ...finally the genesis hash
        hashes.append(self.coin.genesis_block_hash)

        return hashes
Return a list of hashes suitable as a block locator hash.
dataset/ETHPy150Open ricmoo/pycoind/pycoind/blockchain/block.py/Database.block_locator_hashes