mirror of
https://github.com/benjamin-wilson/public-pool.git
synced 2025-03-18 05:41:43 +01:00
test
This commit is contained in:
parent
694af35937
commit
ebe7f27a61
@ -400,19 +400,19 @@ export class StratumV1Client extends EasyUnsubscribe {
|
||||
await this.addressSettingsService.resetBestDifficultyAndShares();
|
||||
}
|
||||
}
|
||||
// try {
|
||||
// await this.statistics.addSubmission(this.entity, submissionHash, this.sessionDifficulty);
|
||||
// await this.addressSettingsService.addShares(this.clientAuthorization.address, this.sessionDifficulty);
|
||||
// } catch (e) {
|
||||
// console.log(e);
|
||||
// const err = new StratumErrorMessage(
|
||||
// submission.id,
|
||||
// eStratumErrorCode.DuplicateShare,
|
||||
// 'Duplicate share').response();
|
||||
// console.error(err);
|
||||
// await this.promiseSocket.write(err);
|
||||
// return false;
|
||||
// }
|
||||
try {
|
||||
await this.statistics.addSubmission(this.entity, submissionHash, this.sessionDifficulty);
|
||||
//await this.addressSettingsService.addShares(this.clientAuthorization.address, this.sessionDifficulty);
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
const err = new StratumErrorMessage(
|
||||
submission.id,
|
||||
eStratumErrorCode.DuplicateShare,
|
||||
'Duplicate share').response();
|
||||
console.error(err);
|
||||
await this.promiseSocket.write(err);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (submissionDifficulty > this.entity.bestDifficulty) {
|
||||
await this.clientService.updateBestDifficulty(this.extraNonceAndSessionId, submissionDifficulty);
|
||||
|
Loading…
x
Reference in New Issue
Block a user