Skip to content

Commit

Permalink
fix crash in PoWValidatorWorker.onCtrlValidate when receiving share…
Browse files Browse the repository at this point in the history
… from older client (<2.3)
  • Loading branch information
pk910 committed Sep 16, 2024
1 parent 40f8dfe commit 30e3c53
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/modules/pow/validator/PoWValidatorWorker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ export class PoWValidatorWorker {
dmask = this.difficultyMasks[req.difficulty] = this.getDifficultyMask(req.difficulty);

let isValid = true;
let nonceHex = req.nonce.toString(16);
let nonceHex = req.nonce?.toString(16) || "";
if(nonceHex.length < 16) {
nonceHex = "0000000000000000".substring(0, 16 - nonceHex.length) + nonceHex;
}
Expand Down

0 comments on commit 30e3c53

Please sign in to comment.