Пример #1
0
        info['meandiff'] = md

output = []
for key in keys:
    output.append([key, str(info[key])])

# Primecoin above
if "difficulty" not in keys:
    output.append(["difficulty", str(diff)])

if options.hashrate:
    hashrate = options.hashrate
    # No point in printing this, if supplied manually
else:
    if coin == "primecoin":
        hashrate = s.getmininginfo()["blocksperday"]
        if options.verbose:
            output.append(["blocksperday", str(hashrate)])
    elif coin == "gapcoin":
        hashrate = s.getprimespersec()
    elif coin in ["bitcoin", "dogecoin", "litecoin", "ExclusiveCoin", "zcash", "zclassic"]:
        # Litecoin: Mining was removed from the client in 0.8
        # EXCL: not available
        # Bitcoin: removed in 0.11.0
        # zcash: no info available despite mining
        hashrate = 0
    else:
        try:
            hashrate = s.getmininginfo()["hashespersec"]
        except:
            hashrate = s.gethashespersec()