Skip to content

Commit

Permalink
filler: add slot logging
Browse files Browse the repository at this point in the history
  • Loading branch information
crispheaney committed Jan 1, 2024
1 parent bd5a770 commit 3df6ddc
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/bots/filler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -1458,6 +1464,8 @@ export class FillerBot implements Bot {
)
);

this.logSlots();

try {
const { makerInfos, takerUser, referrerInfo, marketType } =
await this.getNodeFillInfo(nodeToFill);
Expand Down Expand Up @@ -1571,6 +1579,8 @@ export class FillerBot implements Bot {
)
);

this.logSlots();

const { makerInfos, takerUser, referrerInfo, marketType } =
await this.getNodeFillInfo(nodeToFill);

Expand Down
6 changes: 6 additions & 0 deletions src/bots/fillerLite.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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()}`
);
}
}

0 comments on commit 3df6ddc

Please sign in to comment.