INNER CODE UNIT · Python

last_known

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

            last_known = -1
        logging.info("Checking calendar " + str(self.calendar_url) + ", last_known commitment:" + str(last_known))

        if self.btc_net == 'testnet':
            bitcoin.SelectParams('testnet')
        elif self.btc_net == 'regtest':
            bitcoin.SelectParams('regtest')

        while True:
            start_time = time.time()
            backup_url = urljoin(self.calendar_url, "/experimental/backup/%d" % (last_known + 1))
            logging.debug("Asking " + str(backup_url))
            try:
                r = requests.get(backup_url)
            except Exception as err:
                logging.error("Exception asking %s error message %s, sleeping for %d seconds"
                              % (str(backup_url), str(err), SLEEP_SECS))
                time.sleep(SLEEP_SECS)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…