delete old templates and jobs

This commit is contained in:
Benjamin Wilson
2025-02-10 00:01:55 -05:00
parent 5702e20dc0
commit b545e74d4f
3 changed files with 21 additions and 5 deletions
+2 -1
View File
@@ -18,7 +18,7 @@ export class MiningJob {
public jobTemplateId: string;
public networkDifficulty: number;
public creation: number;
constructor(
private network: bitcoinjs.networks.Network,
@@ -27,6 +27,7 @@ export class MiningJob {
jobTemplate: IJobTemplate
) {
this.creation = new Date().getTime();
this.jobTemplateId = jobTemplate.blockData.id;
this.coinbaseTransaction = this.createCoinbaseTransaction(payoutInformation, jobTemplate.blockData.coinbasevalue);
+1 -3
View File
@@ -477,9 +477,7 @@ export class StratumV1Client {
const job = this.stratumV1JobsService.getJobById(submission.jobId);
// 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 (or expired, 5 min)
if (job == null) {
const err = new StratumErrorMessage(
submission.id,