clear jobs on new block

This commit is contained in:
Ben Wilson
2023-07-16 18:06:31 -04:00
parent 772499a5b3
commit bb133a7af4
2 changed files with 3 additions and 5 deletions
+1 -1
View File
@@ -309,7 +309,7 @@ export class StratumV1Client extends EasyUnsubscribe {
jobTemplate
);
this.stratumV1JobsService.addJob(job, jobTemplate.blockData.clearJobs);
this.stratumV1JobsService.addJob(job);
+2 -4
View File
@@ -126,6 +126,7 @@ export class StratumV1JobsService {
tap((data) => {
if (data.blockData.clearJobs) {
this.blocks = {};
this.jobs = [];
}
this.blocks[data.blockData.id] = data;
}),
@@ -154,10 +155,7 @@ export class StratumV1JobsService {
return this.blocks[jobTemplateId];
}
public addJob(job: MiningJob, clearJobs: boolean) {
if (clearJobs) {
this.jobs = [];
}
public addJob(job: MiningJob) {
this.jobs.push(job);
this.latestJobId++;
}