This commit is contained in:
Ben Wilson
2023-08-05 10:54:37 -04:00
parent 7dbe64300a
commit 10e005c0e9
+4
View File
@@ -82,9 +82,13 @@ export class StratumV1Client {
}
public destroy() {
if (this.stratumSubscription != null) {
this.stratumSubscription.unsubscribe();
}
if (this.backgroundWork != null) {
clearInterval(this.backgroundWork);
}
}
private getRandomHexString() {
const randomBytes = crypto.randomBytes(4); // 4 bytes = 32 bits