Ejemplo n.º 1
0
    def isBlockchainSynced(self):
        res = False
        response_time = None
        with self.lock:
            status, response_time = timeThis(self.conn.mnsync, 'status')
            if status is not None:
                res = status.get("IsBlockchainSynced")

        return res, response_time
Ejemplo n.º 2
0
    def getStatus(self):
        status = False
        statusMess = "Unable to connect to a PIVX RPC server.\n"
        statusMess += "Either the local PIVX wallet is not open, or the remote RPC server is not responding."
        n = 0
        response_time = None
        with self.lock:
            n, response_time = timeThis(self.conn.getblockcount)
            if n is None:
                n = 0

        if n > 0:
            status = True
            statusMess = "Connected to PIVX Blockchain"

        return status, statusMess, n, response_time