mirror of
https://github.com/benjamin-wilson/public-pool.git
synced 2025-04-13 22:39:25 +02:00
share updates
This commit is contained in:
parent
9617ec5685
commit
9895e80a01
@ -44,12 +44,18 @@ export class StratumV1ClientStatistics {
|
||||
|
||||
if (this.currentTimeSlot == null) {
|
||||
this.currentTimeSlot = timeSlot;
|
||||
}
|
||||
|
||||
if (this.currentTimeSlot != timeSlot) {
|
||||
await this.clientStatisticsService.insert({
|
||||
time: this.currentTimeSlot,
|
||||
clientId: client.id,
|
||||
shares: this.shares,
|
||||
acceptedCount: this.acceptedCount,
|
||||
address: client.address,
|
||||
clientName: client.clientName,
|
||||
sessionId: client.sessionId
|
||||
});
|
||||
this.lastSave = new Date().getTime();
|
||||
} else if (this.currentTimeSlot != timeSlot) {
|
||||
await this.clientStatisticsService.insert({
|
||||
time: this.currentTimeSlot,
|
||||
shares: this.shares,
|
||||
acceptedCount: this.acceptedCount,
|
||||
address: client.address,
|
||||
@ -62,7 +68,6 @@ export class StratumV1ClientStatistics {
|
||||
} else if ((date.getTime() - 60 * 1000) > this.lastSave) {
|
||||
await this.clientStatisticsService.update({
|
||||
time: this.currentTimeSlot,
|
||||
clientId: client.id,
|
||||
shares: this.shares,
|
||||
acceptedCount: this.acceptedCount,
|
||||
address: client.address,
|
||||
|
Loading…
x
Reference in New Issue
Block a user