INNER CODE UNIT · Python

end

opentimestamps/opentimestamps-server · otsserver/backup.py:55

        end = start+PAGING

        # Iterate in reverse to fail fast if this chunk is not complete, a chunk is considered complete if all relative
        # 1000 commitments are complete. Which means a tx with more of 6 confirmations timestamp them
        for i in range(start, end)[::-1]:
            try:
                current = self.journal[i]
                current_el = self.calendar[current]
                self.__create_kv_map(current_el, current_el.msg, backup_map)
            except KeyError:
                # according to https://docs.python.org/3/library/exceptions.html#IndexError IndexError is the more
                # appropriate exception for this case
                raise IndexError
            if i % 1000 == 0:
                logging.debug("Got commitment " + str(i) + ":" + b2x(self.journal[i]))

        logging.debug("map len " + str(len(backup_map)) + " start:" + str(start) + " end:" + str(end))
        kv_bytes = self.__kv_map_to_bytes(backup_map)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…