Merge branch 'master' into mainnet-beta

This commit is contained in:
wphan
2025-07-23 18:45:24 -07:00
6 changed files with 17 additions and 3 deletions

View File

@@ -46,6 +46,14 @@ function evaluateHealth(currentSlot: number): {
return { isHealthy: true };
}
const currentHealthStatus = getHealthStatus();
if (currentHealthStatus !== HEALTH_STATUS.Ok) {
return {
isHealthy: false,
reason: `Unhealthy state: ${currentHealthStatus}`,
};
}
const timeDelta = now - globalHealthState.lastSlotTimestamp;
const slotDelta = currentSlot - globalHealthState.lastSlot;

View File

@@ -937,6 +937,7 @@ const main = async (): Promise<void> => {
auctionEndPriceOffsetFrom,
additionalEndPriceBuffer,
userOrderId,
forceUpToSlippage,
} = req.query;
// Validate required parameters
@@ -1001,6 +1002,7 @@ const main = async (): Promise<void> => {
auctionEndPriceOffsetFrom: auctionEndPriceOffsetFrom as any,
additionalEndPriceBuffer: additionalEndPriceBuffer as string,
userOrderId: parseNumber(userOrderId as string),
forceUpToSlippage: parseBoolean(forceUpToSlippage as string),
};
// Only add non-undefined values

View File

@@ -128,6 +128,9 @@ const SPOT_MARKETS_TO_LOAD =
: undefined;
const enableOffloadQueue = process.env.ENABLE_OFFLOAD === 'true';
const ignoreList = process.env.IGNORE_LIST?.split(',') || [
'5N1AcdftujhXWZdBaqfciaKtXn6uVBKjmgwf6aQxR1vW',
];
logger.info(`RPC endpoint: ${endpoint}`);
logger.info(`WS endpoint: ${wsEndpoint}`);
@@ -478,7 +481,7 @@ const main = async () => {
const orderSubscriber = new OrderSubscriberFiltered({
driftClient,
subscriptionConfig,
ignoreList: ['5N1AcdftujhXWZdBaqfciaKtXn6uVBKjmgwf6aQxR1vW']
ignoreList,
});
dlobProvider = getDLOBProviderFromOrderSubscriber(orderSubscriber);

View File

@@ -21,4 +21,5 @@ export type AuctionParamArgs = {
auctionEndPriceOffsetFrom?: TradeOffsetPrice;
additionalEndPriceBuffer?: string;
userOrderId?: number;
forceUpToSlippage?: boolean;
};

View File

@@ -985,7 +985,7 @@ export const mapToMarketOrderParams = async (
slippageTolerance: processedSlippageTolerance,
isOracleOrder: params.isOracleOrder,
additionalEndPriceBuffer,
forceUpToSlippage: true,
forceUpToSlippage: params.forceUpToSlippage,
userOrderId: params.userOrderId,
},
estimatedPrices,