Closed tupieurods closed 10 years ago
Yep, makes sense. zero_stats (only part of what it does) is necessary for diff to be calculated properly. Perhaps we can have zero_pool_stats
or something like this, which only resets what is needed (those which affect difficulty calculation, it is most obvious when switching from coin with difficulty e.g. 500 to coin with difficulty 0.04, or vice-versa). I cannot work on this very soon because there are more pressing issues (segfaults), but if someone does a pull requests we'll take a look.
Ok. Looked into code more closely. Looks like we really need total_tv_start reset, because it's using here: https://github.com/sgminer-dev/sgminer/blob/v5_0/sgminer.c#L5288-L5303 for WU display. So, i'll add pull request tomorrow. But i think there is not enough space for two timers: total uptime and total uptime for current algo, so i'll just fix total uptime and add to function curses_print_uptime start_time argument.
Sounds good to me, thanks!
I guess this is fixed.
From here: https://bitcointalk.org/index.php?topic=632503.msg7148709#msg7148709 Message 147.
In code total uptime it's diff betwenn total_tv_start variable and current time. total_tv_start resets in zero_stats method, which calls when algo switch. I think we need another var(new one) for total uptime calculation. Or we can left this counter for total uptime on current algo and add another one with total uptime.