From dd5b3594789f4facc8562ffaabec406dec23d935 Mon Sep 17 00:00:00 2001 From: Ivan Kalinin Date: Mon, 29 Apr 2024 17:17:33 +0200 Subject: [PATCH] Hide redundant logs for subscriptions --- package.json | 2 +- src/client/SubscriptionController/subscription.ts | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 1d53c9c..a045d9f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "everscale-standalone-client", - "version": "2.1.24", + "version": "2.1.25", "repository": "https://github.com/broxus/everscale-standalone-client", "scripts": { "build": "tsc", diff --git a/src/client/SubscriptionController/subscription.ts b/src/client/SubscriptionController/subscription.ts index c85aae6..66f6c11 100644 --- a/src/client/SubscriptionController/subscription.ts +++ b/src/client/SubscriptionController/subscription.ts @@ -115,7 +115,7 @@ export class ContractSubscription { return this._contract.pollingMethod; }); } catch (e: any) { - console.error(`Error during account refresh (${this._address})`, e); + debugLog(`Error during account refresh (${this._address})`, e); } debugLog('ContractSubscription -> manual -> refreshing ends'); @@ -132,21 +132,21 @@ export class ContractSubscription { let nextBlockId: string; if (this._currentBlockId == null) { - console.warn('Starting reliable connection with unknown block'); + debugLog('ContractSubscription -> starting reliable connection with unknown block'); try { const latestBlock = await connection.getLatestBlock(this._address); this._currentBlockId = latestBlock.id; nextBlockId = this._currentBlockId; } catch (e: any) { - console.error(`Failed to get latest block for ${this._address}`, e); + debugLog(`Failed to get latest block for ${this._address}`, e); continue; } } else { try { nextBlockId = await connection.waitForNextBlock(this._currentBlockId, this._address, NEXT_BLOCK_TIMEOUT); } catch (e: any) { - console.error(`Failed to wait for next block for ${this._address}`); + debugLog(`Failed to wait for next block for ${this._address}`); continue; // retry } } @@ -158,7 +158,7 @@ export class ContractSubscription { }); this._currentBlockId = nextBlockId; } catch (e: any) { - console.error(`Failed to handle block for ${this._address}`, e); + debugLog(`Failed to handle block for ${this._address}`, e); } } }