remove poison pill
This commit is contained in:
@@ -13,8 +13,6 @@ import {
|
|||||||
addOracletoResponse,
|
addOracletoResponse,
|
||||||
l2WithBNToStrings,
|
l2WithBNToStrings,
|
||||||
} from '../utils/utils';
|
} from '../utils/utils';
|
||||||
import { logger } from '../utils/logger';
|
|
||||||
import { webhookMessage } from '../utils/webhook';
|
|
||||||
|
|
||||||
type wsMarketL2Args = {
|
type wsMarketL2Args = {
|
||||||
marketIndex: number;
|
marketIndex: number;
|
||||||
@@ -141,19 +139,6 @@ export class DLOBSubscriberIO extends DLOBSubscriber {
|
|||||||
asks: l2Formatted.asks.slice(0, 5),
|
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(
|
this.redisClient.client.publish(
|
||||||
`orderbook_${marketType}_${l2Args.marketIndex}`,
|
`orderbook_${marketType}_${l2Args.marketIndex}`,
|
||||||
JSON.stringify(l2Formatted)
|
JSON.stringify(l2Formatted)
|
||||||
|
|||||||
Reference in New Issue
Block a user