Browse Source

add frequency and bridge times

Shawn Lu 1 year ago
parent
commit
095392c7b4
1 changed files with 3 additions and 3 deletions
  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