notification messages, dev fee

This commit is contained in:
Ben
2023-07-09 20:15:37 -04:00
parent 9083501e6f
commit e9ae1853af
6 changed files with 20 additions and 18 deletions
+7 -7
View File
@@ -296,15 +296,15 @@ export class StratumV1Client extends EasyUnsubscribe {
private async sendNewMiningJob(blockTemplate: IBlockTemplate, clearJobs: boolean) {
// const payoutInformation = [
// { address: 'bc1q99n3pu025yyu0jlywpmwzalyhm36tg5u37w20d', percent: 1.8 },
// { address: this.clientAuthorization.address, percent: 98.2 }
// ];
const payoutInformation = [
{ address: this.clientAuthorization.address, percent: 100 }
{ address: 'tb1qumezefzdeqqwn5zfvgdrhxjzc5ylr39uhuxcz4', percent: 1.8 },
{ address: this.clientAuthorization.address, percent: 98.2 }
];
// const payoutInformation = [
// { address: this.clientAuthorization.address, percent: 100 }
// ];
const job = new MiningJob(this.stratumV1JobsService.getNextId(), payoutInformation, blockTemplate, clearJobs);
this.stratumV1JobsService.addJob(job, clearJobs);
@@ -347,7 +347,7 @@ export class StratumV1Client extends EasyUnsubscribe {
console.log('!!! BLOCK FOUND !!!');
const blockHex = updatedJobBlock.toHex(false);
const result = await this.bitcoinRpcService.SUBMIT_BLOCK(blockHex);
await this.notificationService.notifySubscribersBlockFound(this.clientAuthorization.address, result);
await this.notificationService.notifySubscribersBlockFound(this.clientAuthorization.address, job.blockTemplate.height, updatedJobBlock, result);
}
try {
await this.statistics.addSubmission(this.entity, submissionHash, this.sessionDifficulty);