patch
This commit is contained in:
15
src/index.ts
15
src/index.ts
@@ -165,13 +165,18 @@ const main = async () => {
|
||||
commitment: stateCommitment,
|
||||
});
|
||||
|
||||
const bulkAccountLoader = new BulkAccountLoader(
|
||||
connection,
|
||||
stateCommitment,
|
||||
ORDERBOOK_UPDATE_INTERVAL * 10
|
||||
),
|
||||
driftClient = new DriftClient({
|
||||
connection,
|
||||
wallet,
|
||||
programID: clearingHousePublicKey,
|
||||
accountSubscription: {
|
||||
type: 'websocket',
|
||||
resubTimeoutMs: 60000,
|
||||
type: 'polling',
|
||||
accountLoader: bulkAccountLoader,
|
||||
},
|
||||
env: driftEnv,
|
||||
userStats: true,
|
||||
@@ -208,11 +213,7 @@ const main = async () => {
|
||||
await userMap.subscribe();
|
||||
const userStatsMap = new UserStatsMap(driftClient, {
|
||||
type: 'polling',
|
||||
accountLoader: new BulkAccountLoader(
|
||||
connection,
|
||||
stateCommitment,
|
||||
ORDERBOOK_UPDATE_INTERVAL * 10
|
||||
),
|
||||
accountLoader: bulkAccountLoader,
|
||||
});
|
||||
await userStatsMap.subscribe();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user