Difficulty adjustment refactor

fixes #1157
This commit is contained in:
softsimon
2022-03-12 14:55:42 +01:00
parent 8d18a143cb
commit 8637059119
13 changed files with 155 additions and 203 deletions

View File

@@ -259,6 +259,10 @@ export class WebsocketService {
this.stateService.utxoSpent$.next(response.utxoSpent);
}
if (response.da) {
this.stateService.difficultyAdjustment$.next(response.da);
}
if (response.backendInfo) {
this.stateService.backendInfo$.next(response.backendInfo);
@@ -301,10 +305,6 @@ export class WebsocketService {
this.stateService.vbytesPerSecond$.next(response.vBytesPerSecond);
}
if (response.lastDifficultyAdjustment !== undefined) {
this.stateService.lastDifficultyAdjustment$.next(response.lastDifficultyAdjustment);
}
if (response.previousRetarget !== undefined) {
this.stateService.previousRetarget$.next(response.previousRetarget);
}