set diff if it isn't suggested

This commit is contained in:
Ben Wilson
2023-06-29 17:11:33 -04:00
parent cef9114c83
commit d0fc60032e
3 changed files with 7 additions and 3 deletions
+5
View File
@@ -219,6 +219,11 @@ export class StratumV1Client extends EasyUnsubscribe {
&& this.clientAuthorization != null
&& this.stratumInitialized == false) {
if (this.clientSuggestedDifficulty == null) {
const setDifficulty = JSON.stringify(new SuggestDifficulty().response(this.sessionDifficulty));
this.socket.write(setDifficulty + '\n')
}
this.stratumInitialized = true;
this.entity = await this.clientService.save({