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