From 3df6ddc709588327473c82b44451c42d59c5a766 Mon Sep 17 00:00:00 2001 From: Chris Heaney Date: Mon, 1 Jan 2024 14:59:38 -0500 Subject: [PATCH] filler: add slot logging --- src/bots/filler.ts | 10 ++++++++++ src/bots/fillerLite.ts | 6 ++++++ 2 files changed, 16 insertions(+) diff --git a/src/bots/filler.ts b/src/bots/filler.ts index 07b93dca..a2911a01 100644 --- a/src/bots/filler.ts +++ b/src/bots/filler.ts @@ -656,6 +656,12 @@ export class FillerBot implements Bot { return Math.max(this.slotSubscriber.getSlot(), this.userMap!.getSlot()); } + protected logSlots() { + logger.info( + `slotSubscriber slot: ${this.slotSubscriber.getSlot()}, userMap slot: ${this.userMap!.getSlot()}` + ); + } + protected getPerpNodesForMarket( market: PerpMarketAccount, dlob: DLOB @@ -1458,6 +1464,8 @@ export class FillerBot implements Bot { ) ); + this.logSlots(); + try { const { makerInfos, takerUser, referrerInfo, marketType } = await this.getNodeFillInfo(nodeToFill); @@ -1571,6 +1579,8 @@ export class FillerBot implements Bot { ) ); + this.logSlots(); + const { makerInfos, takerUser, referrerInfo, marketType } = await this.getNodeFillInfo(nodeToFill); diff --git a/src/bots/fillerLite.ts b/src/bots/fillerLite.ts index 7bae6e73..c30e7349 100644 --- a/src/bots/fillerLite.ts +++ b/src/bots/fillerLite.ts @@ -136,4 +136,10 @@ export class FillerLiteBot extends FillerBot { this.orderSubscriber!.getSlot() ); } + + protected logSlots() { + logger.info( + `slotSubscriber slot: ${this.slotSubscriber.getSlot()}, orderSubscriber slot: ${this.orderSubscriber.getSlot()}` + ); + } }