mirror of
https://git.wownero.com/wownero/wownero-puddle.git
synced 2024-08-15 01:03:20 +00:00
float to double for rounding issues
This commit is contained in:
parent
2d0e62929a
commit
512cfabd0a
4 changed files with 9 additions and 7 deletions
|
@ -127,9 +127,9 @@ typedef struct config_t
|
||||||
uint32_t wallet_rpc_port;
|
uint32_t wallet_rpc_port;
|
||||||
char pool_wallet[ADDRESS_MAX];
|
char pool_wallet[ADDRESS_MAX];
|
||||||
uint64_t pool_start_diff;
|
uint64_t pool_start_diff;
|
||||||
float share_mul;
|
double share_mul;
|
||||||
float pool_fee;
|
double pool_fee;
|
||||||
float payment_threshold;
|
double payment_threshold;
|
||||||
uint32_t pool_port;
|
uint32_t pool_port;
|
||||||
uint32_t log_level;
|
uint32_t log_level;
|
||||||
uint32_t webui_port;
|
uint32_t webui_port;
|
||||||
|
@ -2358,7 +2358,7 @@ read_config(const char *config_file, const char *log_file, bool block_notified)
|
||||||
log_info("\nCONFIG:\n rpc_host = %s\n rpc_port = %u\n "
|
log_info("\nCONFIG:\n rpc_host = %s\n rpc_port = %u\n "
|
||||||
"rpc_timeout = %u\n pool_wallet = %s\n "
|
"rpc_timeout = %u\n pool_wallet = %s\n "
|
||||||
"pool_start_diff = %"PRIu64"\n share_mul = %.2f\n "
|
"pool_start_diff = %"PRIu64"\n share_mul = %.2f\n "
|
||||||
"pool_fee = %.2f\n payment_threshold = %.2f\n "
|
"pool_fee = %.3f\n payment_threshold = %.2f\n "
|
||||||
"wallet_rpc_host = %s\n wallet_rpc_port = %u\n pool_port = %u\n "
|
"wallet_rpc_host = %s\n wallet_rpc_port = %u\n pool_port = %u\n "
|
||||||
"log_level = %u\n webui_port=%u\n "
|
"log_level = %u\n webui_port=%u\n "
|
||||||
"log-file = %s\n block-notified = %u\n",
|
"log-file = %s\n block-notified = %u\n",
|
||||||
|
|
|
@ -111,6 +111,8 @@
|
||||||
el.innerHTML = format_last_time(stats[e]);
|
el.innerHTML = format_last_time(stats[e]);
|
||||||
else if (/hashrate/.test(e))
|
else if (/hashrate/.test(e))
|
||||||
el.innerHTML = format_hashrate(stats[e]);
|
el.innerHTML = format_hashrate(stats[e]);
|
||||||
|
else if (e == "pool_fee")
|
||||||
|
el.innerHTML = (stats[e]*100) + "%";
|
||||||
else
|
else
|
||||||
el.innerHTML = stats[e];
|
el.innerHTML = stats[e];
|
||||||
}
|
}
|
||||||
|
|
|
@ -94,7 +94,7 @@ send_json_stats (void *cls, struct MHD_Connection *connection)
|
||||||
"\"last_block_found\":%"PRIu64","
|
"\"last_block_found\":%"PRIu64","
|
||||||
"\"pool_blocks_found\":%d,"
|
"\"pool_blocks_found\":%d,"
|
||||||
"\"payment_threshold\":%.2f,"
|
"\"payment_threshold\":%.2f,"
|
||||||
"\"pool_fee\":%.2f,"
|
"\"pool_fee\":%.3f,"
|
||||||
"\"pool_port\":%d,"
|
"\"pool_port\":%d,"
|
||||||
"\"connected_miners\":%d,"
|
"\"connected_miners\":%d,"
|
||||||
"\"miner_hashrate\":%"PRIu64","
|
"\"miner_hashrate\":%"PRIu64","
|
||||||
|
|
|
@ -51,8 +51,8 @@ typedef struct wui_context_t
|
||||||
{
|
{
|
||||||
uint32_t port;
|
uint32_t port;
|
||||||
pool_stats_t *pool_stats;
|
pool_stats_t *pool_stats;
|
||||||
float pool_fee;
|
double pool_fee;
|
||||||
float payment_threshold;
|
double payment_threshold;
|
||||||
uint32_t pool_port;
|
uint32_t pool_port;
|
||||||
} wui_context_t;
|
} wui_context_t;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue