def supply(cls): data = utils.make_request('getblockchaininfo') height = data['result']['blocks'] result = utils.supply(height) result['height'] = height return result
def supply(cls): data = utils.make_request("getblockchaininfo") height = data["result"]["blocks"] result = utils.supply(height) result["height"] = height return result
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
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
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