mirror of
https://github.com/benjamin-wilson/public-pool.git
synced 2026-09-29 09:05:06 -07:00
remove watchdog
This commit is contained in:
@@ -318,25 +318,25 @@ export class StratumV1Client {
|
|||||||
|
|
||||||
this.backgroundWork = setInterval(async () => {
|
this.backgroundWork = setInterval(async () => {
|
||||||
await this.checkDifficulty();
|
await this.checkDifficulty();
|
||||||
await this.watchdog();
|
//await this.watchdog();
|
||||||
}, 60 * 1000);
|
}, 60 * 1000);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private async watchdog() {
|
// private async watchdog() {
|
||||||
let time = await this.statistics.getLastSubmissionTime();
|
// let time = await this.statistics.getLastSubmissionTime();
|
||||||
if (time == null) {
|
// if (time == null) {
|
||||||
time = this.sessionStart;
|
// time = this.sessionStart;
|
||||||
}
|
// }
|
||||||
const now = Date.now();
|
// const now = Date.now();
|
||||||
const diffSeconds = (now - time.getTime()) / 1000;
|
// const diffSeconds = (now - time.getTime()) / 1000;
|
||||||
// fifteen minutes
|
// // one hour
|
||||||
if (diffSeconds > 15 * 60) {
|
// if (diffSeconds > 60 * 60) {
|
||||||
console.log('Watchdog ending session');
|
// console.log(`Watchdog ending session ${this.extraNonceAndSessionId}}`);
|
||||||
this.promiseSocket.socket.emit('end', true);
|
// this.promiseSocket.socket.emit('end', true);
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
private async sendNewMiningJob(jobTemplate: IJobTemplate) {
|
private async sendNewMiningJob(jobTemplate: IJobTemplate) {
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user