This commit is contained in:
Ben Wilson
2023-07-31 09:12:58 -04:00
parent 432f5c4325
commit 3a1ae6bf09
6 changed files with 49 additions and 8 deletions
+1 -3
View File
@@ -62,8 +62,6 @@ export class MiningJob {
const testBlock = Object.assign(new bitcoinjs.Block(), jobTemplate.block);
testBlock.transactions[0] = this.coinbaseTransaction;
testBlock.nonce = nonce;
@@ -84,7 +82,7 @@ export class MiningJob {
testBlock.timestamp = timestamp;
return testBlock as any;
return testBlock;
}
+7 -5
View File
@@ -287,11 +287,13 @@ export class StratumV1Client extends EasyUnsubscribe {
this.stratumV1JobsService.newMiningJob$.pipe(
takeUntil(this.easyUnsubscribe)
).subscribe(async (jobTemplate) => {
await this.sendNewMiningJob(jobTemplate);
await this.checkDifficulty();
await this.watchdog();
try {
await this.sendNewMiningJob(jobTemplate);
await this.checkDifficulty();
await this.watchdog();
} catch (e) {
this.promiseSocket.socket.emit('end', true);
}
});
}