mirror of
https://github.com/benjamin-wilson/public-pool.git
synced 2025-03-17 13:21:43 +01:00
stratum: set_difficulty should always be a notification (#32)
This commit is contained in:
parent
9f723782ab
commit
8c62817f73
@ -202,7 +202,7 @@ describe('StratumV1Client', () => {
|
||||
expect(socket.on).toHaveBeenCalled();
|
||||
socketEmitter(Buffer.from(MockRecording1.MINING_SUGGEST_DIFFICULTY));
|
||||
await new Promise((r) => setTimeout(r, 1));
|
||||
expect(socket.write).toHaveBeenCalledWith(`{"id":4,"method":"mining.set_difficulty","params":[512]}\n`, expect.any(Function));
|
||||
expect(socket.write).toHaveBeenCalledWith(`{"id":null,"method":"mining.set_difficulty","params":[512]}\n`, expect.any(Function));
|
||||
});
|
||||
|
||||
it('should set difficulty', async () => {
|
||||
|
@ -31,7 +31,7 @@ export class SuggestDifficulty extends StratumBaseMessage {
|
||||
|
||||
public response(difficulty: number) {
|
||||
return {
|
||||
id: this.id,
|
||||
id: null,
|
||||
method: eResponseMethod.SET_DIFFICULTY,
|
||||
params: [difficulty]
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user