10
src/index.ts
10
src/index.ts
@@ -165,13 +165,19 @@ const main = async () => {
|
|||||||
commitment: stateCommitment,
|
commitment: stateCommitment,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const bulkAccountLoader = new BulkAccountLoader(
|
||||||
|
connection,
|
||||||
|
stateCommitment,
|
||||||
|
ORDERBOOK_UPDATE_INTERVAL
|
||||||
|
);
|
||||||
|
|
||||||
driftClient = new DriftClient({
|
driftClient = new DriftClient({
|
||||||
connection,
|
connection,
|
||||||
wallet,
|
wallet,
|
||||||
programID: clearingHousePublicKey,
|
programID: clearingHousePublicKey,
|
||||||
accountSubscription: {
|
accountSubscription: {
|
||||||
type: 'websocket',
|
type: 'polling',
|
||||||
resubTimeoutMs: 60000,
|
accountLoader: bulkAccountLoader,
|
||||||
},
|
},
|
||||||
env: driftEnv,
|
env: driftEnv,
|
||||||
userStats: true,
|
userStats: true,
|
||||||
|
|||||||
Reference in New Issue
Block a user