示例#1
0
    def supply(cls):
        data = utils.make_request('getblockchaininfo')
        height = data['result']['blocks']
        result = utils.supply(height)
        result['height'] = height

        return result
示例#2
0
    def supply(cls):
        data = utils.make_request("getblockchaininfo")
        height = data["result"]["blocks"]
        result = utils.supply(height)
        result["height"] = height

        return result
示例#3
0
    def info(cls):
        data = utils.make_request('getblockchaininfo')

        if data['error'] is None:
            data['result']['blocks'] = utils.supply(data['result']['blocks'])

            nethash = utils.make_request('getnetworkhashps',
                                         [120, data['result']['blocks']])
            if nethash['error'] is None:
                data['result']['nethash'] = int(nethash['result'])

        return data
示例#4
0
    def info(cls):
        data = utils.make_request("getblockchaininfo")

        if data["error"] is None:
            data["result"]["supply"] = utils.supply(data["result"]["blocks"])["supply"]
            data["result"]["reward"] = utils.reward(data["result"]["blocks"])
            data["result"].pop("verificationprogress")
            data["result"].pop("pruned")
            data["result"].pop("softforks")
            data["result"].pop("bip9_softforks")
            data["result"].pop("warnings")
            data["result"].pop("size_on_disk")

            nethash = utils.make_request("getnetworkhashps", [120, data["result"]["blocks"]])
            if nethash["error"] is None:
                data["result"]["nethash"] = int(nethash["result"])

        return data
示例#5
0
    def info(cls):
        data = utils.make_request('getblockchaininfo')

        if data['error'] is None:
            data['result']['supply'] = utils.supply(
                data['result']['blocks'])['supply']
            data['result']['reward'] = utils.reward(data['result']['blocks'])
            data['result'].pop('verificationprogress')
            data['result'].pop('initialblockdownload')
            data['result'].pop('pruned')
            data['result'].pop('softforks')
            data['result'].pop('bip9_softforks')
            data['result'].pop('warnings')
            data['result'].pop('size_on_disk')

            nethash = utils.make_request('getnetworkhashps',
                                         [120, data['result']['blocks']])
            if nethash['error'] is None:
                data['result']['nethash'] = int(nethash['result'])

        return data