mirror of
https://github.com/benjamin-wilson/public-pool.git
synced 2026-09-29 17:15:03 -07:00
data rework
This commit is contained in:
@@ -24,9 +24,14 @@ export class StratumV1ClientStatistics {
|
||||
difficulty: targetDifficulty,
|
||||
});
|
||||
|
||||
// 10 min
|
||||
var coeff = 1000 * 60 * 10;
|
||||
var date = new Date();
|
||||
var rounded = new Date(Math.round(date.getTime() / coeff) * coeff);
|
||||
|
||||
await this.clientStatisticsService.save({
|
||||
time: new Date(),
|
||||
difficulty: targetDifficulty,
|
||||
time: rounded.getTime(),
|
||||
shares: targetDifficulty,
|
||||
address: client.address,
|
||||
clientName: client.clientName,
|
||||
sessionId: client.sessionId,
|
||||
|
||||
Reference in New Issue
Block a user