def updateTopBlockInfo(self): """ We want to get the top block information, but if groestlcoind is rigorously downloading and verifying the blockchain, it can sometimes take 10s to to respond to JSON-RPC calls! We must do it in the background... If it's already querying, no need to kick off another background request, just return the last value, which may be "stale" but we don't really care for this particular use-case """ if not self.isRunningBitcoind(): return if self.isMidQuery: return self.createProxy() self.queryThread = PyBackgroundThread(self.__backgroundRequestTopBlock) self.queryThread.start()
def startProgressThread(self): self.progress = True self.progressThr = PyBackgroundThread(self.updateProgressStatus) self.progressThr.start()