1
0
mirror of https://github.com/GOSTSec/sgminer synced 2025-01-08 22:08:02 +00:00

Display works completed in summary and API data.

This commit is contained in:
Con Kolivas 2013-11-03 01:01:24 +11:00
parent 8e1ec8bd43
commit c3854378e1
2 changed files with 6 additions and 1 deletions

1
api.c
View File

@ -2546,6 +2546,7 @@ static void poolstatus(struct io_data *io_data, __maybe_unused SOCKETTYPE c, __m
root = api_add_uint(root, "Getworks", &(pool->getwork_requested), false);
root = api_add_int(root, "Accepted", &(pool->accepted), false);
root = api_add_int(root, "Rejected", &(pool->rejected), false);
root = api_add_int(root, "Works", &pool->works, false);
root = api_add_uint(root, "Discarded", &(pool->discarded_work), false);
root = api_add_uint(root, "Stale", &(pool->stale_shares), false);
root = api_add_uint(root, "Get Failures", &(pool->getfail_occasions), false);

View File

@ -3909,8 +3909,10 @@ void switch_pools(struct pool *selected)
void discard_work(struct work *work)
{
if (!work->clone && !work->rolls && !work->mined) {
if (work->pool)
if (work->pool) {
work->pool->discarded_work++;
work->pool->works--;
}
total_discarded++;
applog(LOG_DEBUG, "Discarded work");
} else
@ -4312,6 +4314,7 @@ static void display_pool_summary(struct pool *pool)
if (!pool_localgen(pool))
wlog(" Efficiency (accepted / queued): %.0f%%\n", efficiency);
wlog(" Items worked on: %d\n", pool->works);
wlog(" Discarded work due to new blocks: %d\n", pool->discarded_work);
wlog(" Stale submissions discarded due to new blocks: %d\n", pool->stale_shares);
wlog(" Unable to get work from server occasions: %d\n", pool->getfail_occasions);
@ -7315,6 +7318,7 @@ void print_summary(void)
if (pool->accepted || pool->rejected)
applog(LOG_WARNING, " Reject ratio: %.1f%%", (double)(pool->rejected * 100) / (double)(pool->accepted + pool->rejected));
applog(LOG_WARNING, " Items worked on: %d", pool->works);
applog(LOG_WARNING, " Stale submissions discarded due to new blocks: %d", pool->stale_shares);
applog(LOG_WARNING, " Unable to get work from server occasions: %d", pool->getfail_occasions);
applog(LOG_WARNING, " Submitting work remotely delay occasions: %d\n", pool->remotefail_occasions);