From f67c0a6603b5c8f9a9b153ebd17faabca8e06cb4 Mon Sep 17 00:00:00 2001 From: wphan Date: Tue, 26 Dec 2023 19:59:30 -0800 Subject: [PATCH] remove poison pill --- src/dlob-subscriber/DLOBSubscriberIO.ts | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/src/dlob-subscriber/DLOBSubscriberIO.ts b/src/dlob-subscriber/DLOBSubscriberIO.ts index 1494b52..a630ada 100644 --- a/src/dlob-subscriber/DLOBSubscriberIO.ts +++ b/src/dlob-subscriber/DLOBSubscriberIO.ts @@ -13,8 +13,6 @@ import { addOracletoResponse, l2WithBNToStrings, } from '../utils/utils'; -import { logger } from '../utils/logger'; -import { webhookMessage } from '../utils/webhook'; type wsMarketL2Args = { marketIndex: number; @@ -141,19 +139,6 @@ export class DLOBSubscriberIO extends DLOBSubscriber { asks: l2Formatted.asks.slice(0, 5), }); - // START HACK FOR DEBUGGING FAILURE WEBSOCKET CONNECTIONS - const orderSubscriberSlot = this.slotSource.getSlot(); - const dlobOracleSlot = parseInt(l2Formatted['oracleData']['slot']); - const slotDiff = Math.abs(orderSubscriberSlot - dlobOracleSlot); - if (slotDiff > 50) { - const msg = `DlobPublisher bad slot in ${l2Formatted['marketType']} market ${l2Formatted['marketName']}! abs(oracleSlot (${dlobOracleSlot}) - orderSubscriberSlot (${orderSubscriberSlot})) = ${slotDiff} > 50`; - logger.error(msg); - webhookMessage(msg).then(() => { - process.exit(1); - }); - } - // END HACK FOR DEBUGGING FAILURE WEBSOCKET CONNECTIONS - this.redisClient.client.publish( `orderbook_${marketType}_${l2Args.marketIndex}`, JSON.stringify(l2Formatted)