mirror of
https://git.wownero.com/wownero/wownero-puddle.git
synced 2024-08-15 01:03:20 +00:00
Merge branch 'html' into dev
This commit is contained in:
commit
be34334ee8
4 changed files with 14 additions and 2 deletions
|
@ -1424,6 +1424,7 @@ rpc_on_last_block_header(const char* data, rpc_callback_t *callback)
|
|||
|
||||
pool_stats.network_difficulty = last_block_headers[0]->difficulty;
|
||||
pool_stats.network_hashrate = last_block_headers[0]->difficulty / BLOCK_TIME;
|
||||
pool_stats.network_height = last_block_headers[0]->height;
|
||||
update_pool_hr();
|
||||
|
||||
if (need_new_template)
|
||||
|
|
|
@ -15,6 +15,13 @@
|
|||
table {
|
||||
padding-bottom: 1em;
|
||||
}
|
||||
td {
|
||||
vertical-align: top;
|
||||
white-space: wrap;
|
||||
}
|
||||
td:last-child {
|
||||
white-space: unset;
|
||||
}
|
||||
.wallet {
|
||||
display: none;
|
||||
}
|
||||
|
@ -25,6 +32,7 @@
|
|||
<table>
|
||||
<tr><td>Pool HR: </td><td id="pool_hashrate"></td></tr>
|
||||
<tr><td>Network HR: </td><td id="network_hashrate"></td></tr>
|
||||
<tr><td>Network height: </td><td id="network_height"></td></tr>
|
||||
<tr><td>Blocks found: </td><td id="pool_blocks_found"></td></tr>
|
||||
<tr><td>Last block found: </td><td id="last_block_found"></td></tr>
|
||||
<tr><td>Payment threshold: </td><td id="payment_threshold"></td></tr>
|
||||
|
@ -37,7 +45,7 @@
|
|||
<td>Miner address: </td>
|
||||
<td>
|
||||
<form>
|
||||
<input type="text" id="wa" name="wa" size="8" />
|
||||
<input type="text" id="wa" name="wa" />
|
||||
<input type="submit" value="Submit" />
|
||||
</form>
|
||||
</td>
|
||||
|
|
|
@ -70,6 +70,7 @@ send_json_stats (void *cls, struct MHD_Connection *connection)
|
|||
char json[JSON_MAX];
|
||||
uint64_t ph = context->pool_stats->pool_hashrate;
|
||||
uint64_t nh = context->pool_stats->network_hashrate;
|
||||
uint64_t height = context->pool_stats->network_height;
|
||||
uint64_t lbf = context->pool_stats->last_block_found;
|
||||
uint32_t pbf = context->pool_stats->pool_blocks_found;
|
||||
uint64_t mh = 0;
|
||||
|
@ -84,6 +85,7 @@ send_json_stats (void *cls, struct MHD_Connection *connection)
|
|||
snprintf(json, JSON_MAX, "{"
|
||||
"\"pool_hashrate\":%"PRIu64","
|
||||
"\"network_hashrate\":%"PRIu64","
|
||||
"\"network_height\":%"PRIu64","
|
||||
"\"last_block_found\":%"PRIu64","
|
||||
"\"pool_blocks_found\":%d,"
|
||||
"\"payment_threshold\":%.2f,"
|
||||
|
@ -92,7 +94,7 @@ send_json_stats (void *cls, struct MHD_Connection *connection)
|
|||
"\"connected_miners\":%d,"
|
||||
"\"miner_hashrate\":%"PRIu64","
|
||||
"\"miner_balance\":%.8f"
|
||||
"}", ph, nh, lbf, pbf,
|
||||
"}", ph, nh, height, lbf, pbf,
|
||||
context->payment_threshold, context->pool_fee,
|
||||
context->pool_port, context->pool_stats->connected_miners,
|
||||
mh, mb);
|
||||
|
|
|
@ -37,6 +37,7 @@ typedef struct pool_stats_t
|
|||
{
|
||||
uint64_t network_difficulty;
|
||||
uint64_t network_hashrate;
|
||||
uint64_t network_height;
|
||||
uint32_t connected_miners;
|
||||
uint64_t pool_hashrate;
|
||||
uint32_t pool_blocks_found;
|
||||
|
|
Loading…
Reference in a new issue