Skip to content

Commit ec79426

Browse files
authored
Merge pull request #298 from drift-labs/master
use jito for multithreaded fillers always + add new address to prior …
2 parents 8b43588 + d6b324b commit ec79426

File tree

4 files changed

+12
-4
lines changed

4 files changed

+12
-4
lines changed

src/bots/switchboardCranker.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,13 +64,14 @@ export class SwitchboardCrankerBot implements Bot {
6464
);
6565
await this.slothashSubscriber.subscribe();
6666

67-
this.priorityFeeSubscriber?.updateAddresses(
68-
Object.entries(this.crankConfigs.pullFeedConfigs).map(
67+
this.priorityFeeSubscriber?.updateAddresses([
68+
...Object.entries(this.crankConfigs.pullFeedConfigs).map(
6969
([_alias, config]) => {
7070
return new PublicKey(config.pubkey);
7171
}
72-
)
73-
);
72+
),
73+
...this.crankConfigs.writableAccounts.map((acc) => new PublicKey(acc)),
74+
]);
7475
}
7576

7677
async reset(): Promise<void> {

src/config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ export type SwitchboardCrankerBotConfig = BaseBotConfig & {
116116
pubkey: string;
117117
};
118118
};
119+
writableAccounts: string[];
119120
};
120121

121122
export type BotConfigMap = {

src/experimental-bots/filler/fillerMultithreaded.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,9 @@ export class FillerMultithreaded {
270270
lookupTableAccounts: AddressLookupTableAccount[] = []
271271
) {
272272
this.globalConfig = globalConfig;
273+
if (!this.globalConfig.useJito && runtimeSpec.driftEnv === 'mainnet-beta') {
274+
throw new Error('Jito is required for spot multithreaded filler');
275+
}
273276
this.name = config.botId;
274277
this.config = config;
275278
this.dryRun = config.dryRun;

src/experimental-bots/spotFiller/spotFillerMultithreaded.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,9 @@ export class SpotFillerMultithreaded {
279279
lookupTableAccounts: AddressLookupTableAccount[] = []
280280
) {
281281
this.globalConfig = globalConfig;
282+
if (!this.globalConfig.useJito && runtimeSpec.driftEnv === 'mainnet-beta') {
283+
throw new Error('Jito is required for spot multithreaded filler');
284+
}
282285
this.config = config;
283286
this.name = config.botId;
284287
this.dryRun = config.dryRun;

0 commit comments

Comments
 (0)