diff --git a/src/dex/algebra/algebra.ts b/src/dex/algebra/algebra.ts index 32efc8326..5bb393f83 100644 --- a/src/dex/algebra/algebra.ts +++ b/src/dex/algebra/algebra.ts @@ -165,15 +165,21 @@ export class Algebra extends SimpleExchange implements IDex { token0, token1, }) => { + const logPrefix = '[Algebra.onPoolCreatedDeleteFromNonExistingSet]'; const [_token0, _token1] = this._sortTokens(token0, token1); const poolKey = `${token0}_${token1}`.toLowerCase(); // consider doing it only from master pool for less calls to distant cache try { + this.logger.info( + `${logPrefix} delete pool from not existing set: ${poolKey}`, + ); // delete pool record from set await this.dexHelper.cache.zrem(this.notExistingPoolSetKey, [poolKey]); - } catch (e) {} + } catch (e) { + this.logger.error(`${logPrefix} ERROR deleting pool: ${poolKey}`); + } // delete entry locally to let local instance discover the pool delete this.eventPools[this.getPoolIdentifier(_token0, _token1)]; diff --git a/src/dex/pancakeswap-v3/pancakeswap-v3.ts b/src/dex/pancakeswap-v3/pancakeswap-v3.ts index 5ec7d2183..62903a292 100644 --- a/src/dex/pancakeswap-v3/pancakeswap-v3.ts +++ b/src/dex/pancakeswap-v3/pancakeswap-v3.ts @@ -176,15 +176,21 @@ export class PancakeswapV3 token1, fee, }) => { + const logPrefix = '[PancakeV3.onPoolCreatedDeleteFromNonExistingSet]'; const [_token0, _token1] = this._sortTokens(token0, token1); const poolKey = `${token0}_${token1}_${fee}`.toLowerCase(); // consider doing it only from master pool for less calls to distant cache try { + this.logger.info( + `${logPrefix} delete pool from not existing set: ${poolKey}`, + ); // delete pool record from set await this.dexHelper.cache.zrem(this.notExistingPoolSetKey, [poolKey]); - } catch (e) {} + } catch (e) { + this.logger.error(`${logPrefix} ERROR deleting pool: ${poolKey}`); + } // delete entry locally to let local instance discover the pool delete this.eventPools[this.getPoolIdentifier(_token0, _token1, fee)]; diff --git a/src/dex/uniswap-v3/uniswap-v3.ts b/src/dex/uniswap-v3/uniswap-v3.ts index 1f2a6b613..d4db7efaf 100644 --- a/src/dex/uniswap-v3/uniswap-v3.ts +++ b/src/dex/uniswap-v3/uniswap-v3.ts @@ -206,15 +206,21 @@ export class UniswapV3 token1, fee, }) => { + const logPrefix = '[UniswapV3.onPoolCreatedDeleteFromNonExistingSet]'; const [_token0, _token1] = this._sortTokens(token0, token1); const poolKey = `${token0}_${token1}_${fee}`.toLowerCase(); // consider doing it only from master pool for less calls to distant cache try { + this.logger.info( + `${logPrefix} delete pool from not existing set: ${poolKey}`, + ); // delete pool record from set await this.dexHelper.cache.zrem(this.notExistingPoolSetKey, [poolKey]); - } catch (e) {} + } catch (e) { + this.logger.error(`${logPrefix} ERROR deleting pool: ${poolKey}`); + } // delete entry locally to let local instance discover the pool delete this.eventPools[this.getPoolIdentifier(_token0, _token1, fee)];