aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2017-10-30 18:05:02 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2017-11-10 03:11:45 +0800
commit589bd8694f1c57d8d62bcda86af3475aef655bc2 (patch)
tree9b0fd681bcde941f68c241fddff491f9f5ef5087
parenteace1a984091d7528ed2d07073f399db9d4d7286 (diff)
downloaddexon-sol-tools-589bd8694f1c57d8d62bcda86af3475aef655bc2.tar
dexon-sol-tools-589bd8694f1c57d8d62bcda86af3475aef655bc2.tar.gz
dexon-sol-tools-589bd8694f1c57d8d62bcda86af3475aef655bc2.tar.bz2
dexon-sol-tools-589bd8694f1c57d8d62bcda86af3475aef655bc2.tar.lz
dexon-sol-tools-589bd8694f1c57d8d62bcda86af3475aef655bc2.tar.xz
dexon-sol-tools-589bd8694f1c57d8d62bcda86af3475aef655bc2.tar.zst
dexon-sol-tools-589bd8694f1c57d8d62bcda86af3475aef655bc2.zip
Clear event cache on unsubscribe
-rw-r--r--src/mempool/event_watcher.ts1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/mempool/event_watcher.ts b/src/mempool/event_watcher.ts
index e28219682..1ad30b790 100644
--- a/src/mempool/event_watcher.ts
+++ b/src/mempool/event_watcher.ts
@@ -26,6 +26,7 @@ export class EventWatcher {
}
public unsubscribe(): void {
delete this._callback;
+ this._lastMempoolEvents = [];
intervalUtils.clearAsyncExcludingInterval(this._intervalId);
}
private async _pollForMempoolEventsAsync(): Promise<void> {