Skip to content

Commit 6d52104

Browse files
committed
fix: keeper bot stuck on drawing phase
1 parent 848cc0e commit 6d52104

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

Diff for: contracts/scripts/keeperBot.ts

+7-8
Original file line numberDiff line numberDiff line change
@@ -487,18 +487,17 @@ async function main() {
487487
numberOfMissingJurors = await getMissingJurors(dispute);
488488
} while (!numberOfMissingJurors.eq(0) && !maxDrawingTimePassed);
489489
}
490-
491-
// ----------------------------------------------- //
492-
// BACK TO STAKING PHASE //
493-
// ----------------------------------------------- //
494490
// At this point, either all disputes are fully drawn or max drawing time has passed
495-
let i = 0;
496-
while (!(await isPhaseStaking()) && i++ < 3) {
497-
await passPhase();
498-
}
499491
}
500492
}
501493

494+
// ----------------------------------------------- //
495+
// BACK TO STAKING PHASE //
496+
// ----------------------------------------------- //
497+
for (let i = 0; i < 3 && !(await isPhaseStaking()); i++) {
498+
await passPhase();
499+
}
500+
502501
await sendHeartbeat();
503502

504503
logger.info(`Current phase: ${PHASES[await sortition.phase()]}`);

0 commit comments

Comments
 (0)