Skip to content

Commit

Permalink
Update qubic收益计算器.py
Browse files Browse the repository at this point in the history
  • Loading branch information
EdmundFu-233 committed Mar 20, 2024
1 parent e6014e5 commit 689499a
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions qubic收益计算器.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version = "v2.5"
version = "v2.5.1"
import os
import json
import requests
Expand Down Expand Up @@ -173,6 +173,13 @@ def miner_detail(miner_info,table_name):
,"{:.1%}".format(miner_luckiness(netHashrate,miner['currentIts'],miner['solutionsFound'],latest_avg_score(networkStat))))


def summary_luckiness():
luckiness = miner_luckiness(netHashrate,myHashrate,miner_info_temp["foundSolutions"],latest_avg_score(networkStat))
if luckiness != "N/A":
return "{:.1%}".format(miner_luckiness(netHashrate,myHashrate,miner_info_temp["foundSolutions"],latest_avg_score(networkStat)))
else:
return "N/A"

table_epoch_info = Table(title="⌛ 目前纪元信息⌛")
table_epoch_info.add_column('信息类型', style="cyan")
table_epoch_info.add_column('数值', justify="right", style="green")
Expand Down Expand Up @@ -225,7 +232,7 @@ def miner_detail(miner_info,table_name):
table_miner_summary.add_column('总幸运值', justify="right", style="green")
table_miner_summary.add_column('截止目前收益', justify="right", style="green")
table_miner_summary.add_row(str(myHashrate) + " it/s",str(miner_info_temp["foundSolutions"])
,"{:.1%}".format(miner_luckiness(netHashrate,myHashrate,miner_info_temp["foundSolutions"],latest_avg_score(networkStat)))
,summary_luckiness()
,'{:.2f}¥'.format(currency_convert_cny(curSolPrice) * miner_info_temp["foundSolutions"]))
Console().print(table_miner_summary)

Expand Down

0 comments on commit 689499a

Please sign in to comment.