Skip to content

Commit

Permalink
Merge branch 'master' into merge-mining
Browse files Browse the repository at this point in the history
  • Loading branch information
SChernykh committed Jan 10, 2024
2 parents ec15417 + 3797f01 commit e1f847b
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 1 deletion.
11 changes: 11 additions & 0 deletions docker-compose/statistics/app/p2pool_statistics.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,24 @@ def render():
network_stats = json.loads(reader.read())
with open("/data/local/stratum", "r") as reader:
local_stats = json.loads(reader.read())
workers = local_stats["workers"][:30] # limit workers output list
workers_concat = []
for w in workers:
w_list = w.split(",")
w_list[1] = humanfriendly.format_timespan(int(w_list[1]))
w_list[2] = human_numbers(int(w_list[2]))
workers_concat.append(w_list)
workers_concat = sorted(workers_concat, key=lambda x: int(x[3]), reverse=True)
for w in workers_concat:
w[3] = human_numbers(int(w[3]))
return render_template(
"index.html",
my_bday=my_bday,
stats_mod=stats_mod,
pool_stats=pool_stats,
network_stats=network_stats,
local_stats=local_stats,
workers=workers_concat,
)
except Exception as e:
return render_template("oops.html", error=str(e))
Expand Down
23 changes: 23 additions & 0 deletions docker-compose/statistics/app/templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,29 @@ <h6 class="card-subtitle text-muted" style="font-size:80%;">(note: stats reset o
<td>Block reward share</td>
<td>{{ local_stats["block_reward_share_percent"] }}%</td>
</tr>
<tr>
<td>Workers
<h6 class="card-subtitle text-muted" style="font-size:80%;">(note: limited to the first 30 workers)</h6>
</td>
<td>
<table style="font-size:65%;">
<tr>
<th>IP:Port</th>
<th>Uptime</th>
<th>Difficulty</th>
<th>Hashrate</th>
<th>Name</th>
</tr>
{% for w in workers %}
<tr>
{% for w_detail in w %}
<td>{{ w_detail }}</td>
{% endfor %}
</tr>
{% endfor %}
</table>
</td>
</tr>
</tbody>
</table>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/util.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
namespace p2pool {

#define P2POOL_VERSION_MAJOR 3
#define P2POOL_VERSION_MINOR 9
#define P2POOL_VERSION_MINOR 10
#define P2POOL_VERSION_PATCH 0

extern const char* VERSION;
Expand Down

0 comments on commit e1f847b

Please sign in to comment.