Live 2H graph is now fetched through the websocket.

Tell the web socket what to fetch with "want" request.
This commit is contained in:
Simon Lindh
2019-07-26 12:48:32 +03:00
parent 057691bdbb
commit c99d2d49d7
10 changed files with 122 additions and 105 deletions

View File

@@ -26,6 +26,8 @@ export class BlockchainComponent implements OnInit, OnDestroy {
) {}
ngOnInit() {
this.apiService.sendWebSocket({'action': 'want', data: ['stats', 'blocks', 'projected-blocks']});
this.txTrackingSubscription = this.memPoolService.txTracking$
.subscribe((response: ITxTracking) => {
this.txTrackingLoading = false;

View File

@@ -12,6 +12,7 @@ export interface IMempoolDefaultResponse {
blocks?: IBlock[];
block?: IBlock;
projectedBlocks?: IProjectedBlock[];
'live-2h-chart'?: IMempoolStats;
txPerSecond?: number;
vBytesPerSecond: number;
'track-tx'?: ITrackTx;