mirror of
https://github.com/GOSTSec/sgminer
synced 2025-01-22 20:44:19 +00:00
API add Best Share to summary
This commit is contained in:
parent
a67e96c3e4
commit
e55fe73f9a
@ -392,7 +392,10 @@ Added API commands:
|
|||||||
'usbstats'
|
'usbstats'
|
||||||
|
|
||||||
Modified API commands:
|
Modified API commands:
|
||||||
each MMQ shows up as 4 devices each with it's own stats
|
'summary' - add 'Best Share'
|
||||||
|
|
||||||
|
Modifed output:
|
||||||
|
each MMQ shows up as 4 devices, each with it's own stats
|
||||||
|
|
||||||
----------
|
----------
|
||||||
|
|
||||||
|
1
api.c
1
api.c
@ -1913,6 +1913,7 @@ static void summary(__maybe_unused SOCKETTYPE c, __maybe_unused char *param, boo
|
|||||||
root = api_add_diff(root, "Difficulty Accepted", &(total_diff_accepted), true);
|
root = api_add_diff(root, "Difficulty Accepted", &(total_diff_accepted), true);
|
||||||
root = api_add_diff(root, "Difficulty Rejected", &(total_diff_rejected), true);
|
root = api_add_diff(root, "Difficulty Rejected", &(total_diff_rejected), true);
|
||||||
root = api_add_diff(root, "Difficulty Stale", &(total_diff_stale), true);
|
root = api_add_diff(root, "Difficulty Stale", &(total_diff_stale), true);
|
||||||
|
root = api_add_uint64(root, "Best Share", &(best_diff), true);
|
||||||
|
|
||||||
mutex_unlock(&hash_lock);
|
mutex_unlock(&hash_lock);
|
||||||
|
|
||||||
|
@ -228,7 +228,7 @@ static char datestamp[40];
|
|||||||
static char blocktime[32];
|
static char blocktime[32];
|
||||||
struct timeval block_timeval;
|
struct timeval block_timeval;
|
||||||
static char best_share[8] = "0";
|
static char best_share[8] = "0";
|
||||||
static uint64_t best_diff = 0;
|
uint64_t best_diff = 0;
|
||||||
|
|
||||||
struct block {
|
struct block {
|
||||||
char hash[40];
|
char hash[40];
|
||||||
|
1
miner.h
1
miner.h
@ -786,6 +786,7 @@ extern const int opt_cutofftemp;
|
|||||||
extern int opt_log_interval;
|
extern int opt_log_interval;
|
||||||
extern unsigned long long global_hashrate;
|
extern unsigned long long global_hashrate;
|
||||||
extern char *current_fullhash;
|
extern char *current_fullhash;
|
||||||
|
extern uint64_t best_diff;
|
||||||
extern struct timeval block_timeval;
|
extern struct timeval block_timeval;
|
||||||
|
|
||||||
#ifdef HAVE_OPENCL
|
#ifdef HAVE_OPENCL
|
||||||
|
Loading…
x
Reference in New Issue
Block a user