header: clear _syncCheckInterval upon synced

Header service: clear _syncCheckInterval to null when clearing interval after sync completed
This commit is contained in:
sairajzero 2023-01-17 16:44:42 +05:30
parent e6826c7dfc
commit 0572ee6b35

View File

@ -533,8 +533,10 @@ HeaderService.prototype._onHeadersSave = function(callback) {
}
//SZ: clear the interval check as sync is completed
if(self._syncCheckInterval)
if(self._syncCheckInterval){
clearInterval(self._syncCheckInterval);
self._syncCheckInterval = null;
}
self._endHeaderSubscription(); // we don't need headers any more
self._startBlockSubscription(); // we need new blocks coming tu us aynchronuously