From e2126f9211c035d52c06344eec0a4522ee6bcd53 Mon Sep 17 00:00:00 2001 From: xiaoch05 Date: Tue, 8 Oct 2024 21:25:13 +0800 Subject: [PATCH] decrease the interval of withdrawLiquidity checking --- src/dataworker/dataworker.service.ts | 3 ++- src/relayer/relayer.service.ts | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/dataworker/dataworker.service.ts b/src/dataworker/dataworker.service.ts index 1c690e7..903f68a 100644 --- a/src/dataworker/dataworker.service.ts +++ b/src/dataworker/dataworker.service.ts @@ -160,6 +160,7 @@ export class DataworkerService implements OnModuleInit { return feeUsed; } + // MUST: countThreshold <= 40 ELSE invalid threshold async queryLiquidity( url: string, fromChain: string, @@ -173,7 +174,7 @@ export class DataworkerService implements OnModuleInit { if (!amountThreshold && !countThreshold) return null; let query = `{ historyRecords( - row: 100, + row: 40, relayer: \"${relayer.toLowerCase()}\", recvTokenAddress: \"${token.toLowerCase()}\", fromChains: [\"${fromChain}\"], diff --git a/src/relayer/relayer.service.ts b/src/relayer/relayer.service.ts index b3dc241..4d69c12 100644 --- a/src/relayer/relayer.service.ts +++ b/src/relayer/relayer.service.ts @@ -89,7 +89,7 @@ export class RelayerService implements OnModuleInit { private readonly scheduleAdjustFeeInterval = 8640; // 1day private readonly maxWaitingPendingTimes = 180; private readonly heartBeatInterval = 12; // 2 minute - private readonly withdrawLiqudityInterval = 2160; // 6 hour + private readonly withdrawLiqudityInterval = 360; // 1 hour private readonly updateDynamicFeeInterval = 60; // 10 min private readonly repayLendInterval = 60; private chainInfos = new Map();