remove watchdog

This commit is contained in:
Ben Wilson
2023-08-05 11:28:52 -04:00
parent e5efe2df21
commit a9e8b66a6f
+14 -14
View File
@@ -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) {