mirror of
https://github.com/mempool/mempool.git
synced 2025-02-23 14:40:38 +01:00
fix stuck mempool block on network change
This commit is contained in:
parent
a5fbc94182
commit
96afbca029
1 changed files with 3 additions and 1 deletions
|
@ -37,6 +37,7 @@ export class WebsocketService {
|
|||
private isTrackingWallet: boolean = false;
|
||||
private trackingWalletName: string;
|
||||
private trackingMempoolBlock: number;
|
||||
private trackingMempoolBlockNetwork: string;
|
||||
private stoppingTrackMempoolBlock: any | null = null;
|
||||
private latestGitCommit = '';
|
||||
private onlineCheckTimeout: number;
|
||||
|
@ -226,10 +227,11 @@ export class WebsocketService {
|
|||
clearTimeout(this.stoppingTrackMempoolBlock);
|
||||
}
|
||||
// skip duplicate tracking requests
|
||||
if (force || this.trackingMempoolBlock !== block) {
|
||||
if (force || this.trackingMempoolBlock !== block || this.network !== this.trackingMempoolBlockNetwork) {
|
||||
this.websocketSubject.next({ 'track-mempool-block': block });
|
||||
this.isTrackingMempoolBlock = true;
|
||||
this.trackingMempoolBlock = block;
|
||||
this.trackingMempoolBlockNetwork = this.network;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
Loading…
Add table
Reference in a new issue