Merge pull request #4542 from mempool/mononaut/unsub-track-block

unsubscribe from mempool block tracking
This commit is contained in:
softsimon authored and GitHub committed 2024-01-09 08:46:15 +07:00
commit 6da4f34656
2 files changed
+2 -1

No files matched your search

+1 -1
View File
@@ -968,7 +968,7 @@ class WebsocketHandler {
if (client['track-tx']) {
numTxSubs++;
}
if (client['track-mempool-block'] >= 0) {
if (client['track-mempool-block'] != null && client['track-mempool-block'] >= 0) {
numProjectedSubs++;
}
if (client['track-rbf']) {
@@ -75,6 +75,7 @@ export class MempoolBlockComponent implements OnInit, OnDestroy {
ngOnDestroy(): void {
this.stateService.markBlock$.next({});
this.websocketService.stopTrackMempoolBlock();
}
getOrdinal(mempoolBlock: MempoolBlock): string {