allow client to suggest diff in password field "d=1234"

This commit is contained in:
Ben Wilson
2024-03-27 17:02:11 -04:00
parent 6442bb45e0
commit 32a604e745
2 changed files with 23 additions and 3 deletions
+3
View File
@@ -217,6 +217,9 @@ export class StratumV1Client {
if (errors.length === 0) {
this.clientAuthorization = authorizationMessage;
if (this.clientSuggestedDifficulty == null && this.clientAuthorization.startingDiff != null && this.clientAuthorization.startingDiff > this.sessionDifficulty) {
this.sessionDifficulty = this.clientAuthorization.startingDiff;
}
const success = await this.write(JSON.stringify(this.clientAuthorization.response()) + '\n');
if (!success) {
return;