mirror of
https://github.com/benjamin-wilson/public-pool.git
synced 2026-09-29 09:05:06 -07:00
bug
This commit is contained in:
@@ -477,10 +477,10 @@ export class StratumV1Client {
|
|||||||
|
|
||||||
const job = this.stratumV1JobsService.getJobById(submission.jobId);
|
const job = this.stratumV1JobsService.getJobById(submission.jobId);
|
||||||
|
|
||||||
const jobTemplate = this.stratumV1JobsService.getJobTemplateById(job.jobTemplateId);
|
|
||||||
|
|
||||||
// a miner may submit a job that doesn't exist anymore if it was removed by a new block notification
|
// a miner may submit a job that doesn't exist anymore if it was removed by a new block notification
|
||||||
if (job == null || jobTemplate == null) {
|
if (job == null) {
|
||||||
const err = new StratumErrorMessage(
|
const err = new StratumErrorMessage(
|
||||||
submission.id,
|
submission.id,
|
||||||
eStratumErrorCode.JobNotFound,
|
eStratumErrorCode.JobNotFound,
|
||||||
@@ -493,6 +493,21 @@ export class StratumV1Client {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const jobTemplate = this.stratumV1JobsService.getJobTemplateById(job.jobTemplateId);
|
||||||
|
|
||||||
|
if (jobTemplate == null) {
|
||||||
|
const err = new StratumErrorMessage(
|
||||||
|
submission.id,
|
||||||
|
eStratumErrorCode.JobNotFound,
|
||||||
|
'Job Template not found').response();
|
||||||
|
//console.log(err);
|
||||||
|
const success = await this.write(err);
|
||||||
|
if (!success) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
const updatedJobBlock = job.copyAndUpdateBlock(
|
const updatedJobBlock = job.copyAndUpdateBlock(
|
||||||
jobTemplate,
|
jobTemplate,
|
||||||
|
|||||||
Reference in New Issue
Block a user