mirror of
https://github.com/benjamin-wilson/public-pool.git
synced 2026-09-29 17:15:03 -07:00
delete old templates and jobs
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user