소스 검색

add frequency and bridge times

Shawn Lu 1 년 전
부모
커밋
095392c7b4
1개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  1. 3 3
      src/jobs/CreateBridgeTaskJob.ts

+ 3 - 3
src/jobs/CreateBridgeTaskJob.ts

@@ -33,7 +33,7 @@ export class CreateBridgeTaskJob extends CronJob {
         data: {
           Task: {
             create: {
-              scheduleTime: this.getRandomTime(30),
+              scheduleTime: this.getRandomTime(14),
               fromChain: account.currentChainId,
               toChain: this.getRandomDestination(account),
               status: TaskStatus.AWAITING,
@@ -52,9 +52,9 @@ export class CreateBridgeTaskJob extends CronJob {
 
   private getRandomDestination(account: Account) {
     let toZkSync = false
-    if (account.bridgeCount > 7 && account.bridgeCount < 10) {
+    if (account.bridgeCount > 12 && account.bridgeCount < 18) {
       toZkSync = Math.random() > 0.5
-    } else if (account.bridgeCount >= 10) {
+    } else if (account.bridgeCount >= 18) {
       toZkSync = true
     }
     if (toZkSync) return ChainId.ZKSYNC