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:
@@ -327,7 +327,7 @@ export class StratumV1Client extends EasyUnsubscribe {
|
|||||||
private async handleMiningSubmission(submission: MiningSubmitMessage) {
|
private async handleMiningSubmission(submission: MiningSubmitMessage) {
|
||||||
|
|
||||||
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) {
|
if (job == null) {
|
||||||
const err = new StratumErrorMessage(
|
const err = new StratumErrorMessage(
|
||||||
@@ -338,6 +338,8 @@ export class StratumV1Client extends EasyUnsubscribe {
|
|||||||
await this.promiseSocket.write(err);
|
await this.promiseSocket.write(err);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
const jobTemplate = this.stratumV1JobsService.getJobTemplateById(job.jobTemplateId);
|
||||||
|
|
||||||
const updatedJobBlock = job.copyAndUpdateBlock(
|
const updatedJobBlock = job.copyAndUpdateBlock(
|
||||||
jobTemplate,
|
jobTemplate,
|
||||||
parseInt(submission.versionMask, 16),
|
parseInt(submission.versionMask, 16),
|
||||||
|
|||||||
Reference in New Issue
Block a user