forked from coinchimp/kaspool-app
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
We now use the actual time span of the shares for the window size, capped at 10 minutes. This adapts better to varying share submission rates. The weighting system now uses an exponential decay function, which gives more emphasis to recent shares while still considering older ones. Error handling has been added to prevent a single miner's calculation from breaking the entire function. We now store the calculated hashrate in the workerStats object for potential use elsewhere in the application. The total hashrate is now reported with fixed decimal places for consistency. These changes should provide a more accurate and robust hashrate calculation while maintaining good performance. The exponential decay weighting will make the hashrate more responsive to recent changes in a miner's performance.
- Loading branch information
1 parent
f720c90
commit 8d538ac
Showing
1 changed file
with
45 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters