Merge branch 'master' into mainnet-beta
This commit is contained in:
@@ -324,29 +324,34 @@ const main = async () => {
|
|||||||
let accountSubscription: DriftClientSubscriptionConfig;
|
let accountSubscription: DriftClientSubscriptionConfig;
|
||||||
let slotSource: SlotSource;
|
let slotSource: SlotSource;
|
||||||
|
|
||||||
|
// NOTE: disable GRPC for general driftClient subscriptions until we can reliably subscribe
|
||||||
|
// to multiple streams. Currently this causes the nodes to start killing connections.
|
||||||
|
//
|
||||||
// USE_GRPC=true will override websocket
|
// USE_GRPC=true will override websocket
|
||||||
if (useGrpc) {
|
// if (useGrpc) {
|
||||||
accountSubscription = {
|
// accountSubscription = {
|
||||||
type: 'grpc',
|
// type: 'grpc',
|
||||||
resubTimeoutMs: 30_000,
|
// resubTimeoutMs: 30_000,
|
||||||
grpcConfigs: {
|
// grpcConfigs: {
|
||||||
endpoint,
|
// endpoint,
|
||||||
token,
|
// token,
|
||||||
channelOptions: {
|
// channelOptions: {
|
||||||
'grpc.keepalive_time_ms': 10_000,
|
// 'grpc.keepalive_time_ms': 10_000,
|
||||||
'grpc.keepalive_timeout_ms': 1_000,
|
// 'grpc.keepalive_timeout_ms': 1_000,
|
||||||
'grpc.keepalive_permit_without_calls': 1,
|
// 'grpc.keepalive_permit_without_calls': 1,
|
||||||
},
|
// },
|
||||||
},
|
// },
|
||||||
};
|
// };
|
||||||
|
|
||||||
slotSubscriber = new SlotSubscriber(connection);
|
// slotSubscriber = new SlotSubscriber(connection);
|
||||||
await slotSubscriber.subscribe();
|
// await slotSubscriber.subscribe();
|
||||||
|
|
||||||
slotSource = {
|
// slotSource = {
|
||||||
getSlot: () => slotSubscriber!.getSlot(),
|
// getSlot: () => slotSubscriber!.getSlot(),
|
||||||
};
|
// };
|
||||||
} else if (!useWebsocket) {
|
// }
|
||||||
|
|
||||||
|
if (!useWebsocket) {
|
||||||
bulkAccountLoader = new BulkAccountLoader(
|
bulkAccountLoader = new BulkAccountLoader(
|
||||||
connection,
|
connection,
|
||||||
stateCommitment,
|
stateCommitment,
|
||||||
|
|||||||
Reference in New Issue
Block a user