stuck slot subscriber causing cahce mis

This commit is contained in:
Nour Alharithi
2024-03-08 13:21:06 -08:00
parent a733942581
commit 84229d3ad1

View File

@@ -275,7 +275,9 @@ const main = async (): Promise<void> => {
type: 'websocket',
commitment: stateCommitment,
};
slotSubscriber = new SlotSubscriber(connection);
slotSubscriber = new SlotSubscriber(connection, {
resubTimeoutMs: 5000
});
await slotSubscriber.subscribe();
}
@@ -768,7 +770,7 @@ const main = async (): Promise<void> => {
const parsedResponse = JSON.parse(redisResponse);
if (
parsedResponse &&
Math.abs(dlobProvider.getSlot() - parsedResponse.slot) <
dlobProvider.getSlot() - parsedResponse.slot <
SLOT_STALENESS_TOLERANCE
) {
if (side === 'bid') {