|
|
|
@ -2349,6 +2349,8 @@ static uint64_t share_diff(const struct work *work)
@@ -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; |
|
|
|
|
} |
|
|
|
@ -3933,6 +3935,10 @@ void zero_stats(void)
@@ -3933,6 +3935,10 @@ void zero_stats(void)
|
|
|
|
|
total_diff1 = 0; |
|
|
|
|
memset(best_share, 0, 8); |
|
|
|
|
suffix_string(best_diff, best_share, 0); |
|
|
|
|
found_blocks = 0; |
|
|
|
|
total_diff_accepted = 0; |
|
|
|
|
total_diff_rejected = 0; |
|
|
|
|
total_diff_stale = 0; |
|
|
|
|
|
|
|
|
|
for (i = 0; i < total_pools; i++) { |
|
|
|
|
struct pool *pool = pools[i]; |
|
|
|
@ -3944,6 +3950,13 @@ void zero_stats(void)
@@ -3944,6 +3950,13 @@ void zero_stats(void)
|
|
|
|
|
pool->discarded_work = 0; |
|
|
|
|
pool->getfail_occasions = 0; |
|
|
|
|
pool->remotefail_occasions = 0; |
|
|
|
|
pool->last_share_time = 0; |
|
|
|
|
pool->diff1 = 0; |
|
|
|
|
pool->diff_accepted = 0; |
|
|
|
|
pool->diff_rejected = 0; |
|
|
|
|
pool->diff_stale = 0; |
|
|
|
|
pool->last_share_diff = 0; |
|
|
|
|
pool->best_diff = 0; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
mutex_lock(&hash_lock); |
|
|
|
@ -3955,6 +3968,11 @@ void zero_stats(void)
@@ -3955,6 +3968,11 @@ void zero_stats(void)
|
|
|
|
|
cgpu->rejected = 0; |
|
|
|
|
cgpu->hw_errors = 0; |
|
|
|
|
cgpu->utility = 0.0; |
|
|
|
|
cgpu->last_share_pool_time = 0; |
|
|
|
|
cgpu->diff1 = 0; |
|
|
|
|
cgpu->diff_accepted = 0; |
|
|
|
|
cgpu->diff_rejected = 0; |
|
|
|
|
cgpu->last_share_diff = 0; |
|
|
|
|
} |
|
|
|
|
mutex_unlock(&hash_lock); |
|
|
|
|
} |
|
|
|
|