mirror of
https://github.com/GOSTSec/sgminer
synced 2025-01-22 20:44:19 +00:00
Remember best share per pool and return in API pools
This commit is contained in:
parent
ec9b32aac0
commit
03f626e68d
@ -400,7 +400,14 @@ miner.php - an example web page to access the API
|
||||
Feature Changelog for external applications using the API:
|
||||
|
||||
|
||||
API V1.23
|
||||
API V1.24
|
||||
|
||||
Modified API commands:
|
||||
'pools' - add 'Best Share'
|
||||
|
||||
----------
|
||||
|
||||
API V1.23 (cgminer v2.10.2)
|
||||
|
||||
Added API commands:
|
||||
'pgaset' - with: MMQ opt=clock val=160 to 230 (and a multiple of 2)
|
||||
|
1
api.c
1
api.c
@ -1993,6 +1993,7 @@ static void poolstatus(struct io_data *io_data, __maybe_unused SOCKETTYPE c, __m
|
||||
else
|
||||
root = api_add_const(root, "Stratum URL", BLANK, false);
|
||||
root = api_add_bool(root, "Has GBT", &(pool->has_gbt), false);
|
||||
root = api_add_uint64(root, "Best Share", &(pool->best_diff), true);
|
||||
|
||||
root = print_data(root, buf, isjson, isjson && (i > 0));
|
||||
io_add(io_data, buf);
|
||||
|
@ -2349,6 +2349,8 @@ static uint64_t share_diff(const struct work *work)
|
||||
best_diff = ret;
|
||||
suffix_string(best_diff, best_share, 0);
|
||||
}
|
||||
if (ret > work->pool->best_diff)
|
||||
work->pool->best_diff = ret;
|
||||
mutex_unlock(&control_lock);
|
||||
return ret;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user