This commit is contained in:
Ben Wilson
2024-02-17 19:01:24 -05:00
parent 9895e80a01
commit aab69b65fc
+3
View File
@@ -46,6 +46,7 @@ export class StratumV1ClientStatistics {
this.currentTimeSlot = timeSlot; this.currentTimeSlot = timeSlot;
await this.clientStatisticsService.insert({ await this.clientStatisticsService.insert({
time: this.currentTimeSlot, time: this.currentTimeSlot,
clientId: client.id,
shares: this.shares, shares: this.shares,
acceptedCount: this.acceptedCount, acceptedCount: this.acceptedCount,
address: client.address, address: client.address,
@@ -56,6 +57,7 @@ export class StratumV1ClientStatistics {
} else if (this.currentTimeSlot != timeSlot) { } else if (this.currentTimeSlot != timeSlot) {
await this.clientStatisticsService.insert({ await this.clientStatisticsService.insert({
time: this.currentTimeSlot, time: this.currentTimeSlot,
clientId: client.id,
shares: this.shares, shares: this.shares,
acceptedCount: this.acceptedCount, acceptedCount: this.acceptedCount,
address: client.address, address: client.address,
@@ -68,6 +70,7 @@ export class StratumV1ClientStatistics {
} else if ((date.getTime() - 60 * 1000) > this.lastSave) { } else if ((date.getTime() - 60 * 1000) > this.lastSave) {
await this.clientStatisticsService.update({ await this.clientStatisticsService.update({
time: this.currentTimeSlot, time: this.currentTimeSlot,
clientId: client.id,
shares: this.shares, shares: this.shares,
acceptedCount: this.acceptedCount, acceptedCount: this.acceptedCount,
address: client.address, address: client.address,