Merge pull request #14 from drift-labs/polling-patch

polling patch
This commit is contained in:
Nour Alharithi
2023-11-11 09:38:42 -08:00
committed by GitHub

View File

@@ -165,13 +165,19 @@ const main = async () => {
commitment: stateCommitment,
});
const bulkAccountLoader = new BulkAccountLoader(
connection,
stateCommitment,
ORDERBOOK_UPDATE_INTERVAL
);
driftClient = new DriftClient({
connection,
wallet,
programID: clearingHousePublicKey,
accountSubscription: {
type: 'websocket',
resubTimeoutMs: 60000,
type: 'polling',
accountLoader: bulkAccountLoader,
},
env: driftEnv,
userStats: true,