Skip to content

Commit

Permalink
fix: compressor batch size config
Browse files Browse the repository at this point in the history
  • Loading branch information
doomsower committed Dec 25, 2024
1 parent 7eca058 commit 2e5c451
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/attachSDK.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export default async function attachSDK(): Promise<CreditAccountsService> {
// },
// );
const service = new CreditAccountsService(sdk, {
batchSize: config.batchSize, // TODO: technically, this is different batch size, needs to be changed
batchSize: config.compressorBatchSize,
});

return service;
Expand Down
1 change: 1 addition & 0 deletions src/config/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const envConfigMapping: Record<keyof ConfigSchema, string | string[]> = {
debugAccount: "DEBUG_ACCOUNT",
debugManager: "DEBUG_MANAGER",
batchSize: "BATCH_SIZE",
compressorBatchSize: "COMPRESSOR_BATCH_SIZE",
castBin: "CAST_BIN",
deployPartialLiquidatorContracts: "DEPLOY_PARTIAL_LIQUIDATOR",
deployBatchLiquidatorContracts: "DEPLOY_BATCH_LIQUIDATOR",
Expand Down
4 changes: 4 additions & 0 deletions src/config/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,10 @@ export const ConfigSchema = z.object({
* Number of accounts to liquidate at once using batch liquidator
*/
batchSize: z.coerce.number().nonnegative().default(10),
/**
* Limit number of accounts to load from compressor. 0 = unlimited, let compressor decide
*/
compressorBatchSize: z.coerce.number().nonnegative().default(0),
/**
* Slippage value for pathfined
*/
Expand Down

0 comments on commit 2e5c451

Please sign in to comment.