We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6723c6b commit ddd5bd7Copy full SHA for ddd5bd7
tests/krypton/krypton-env.ts
@@ -36,6 +36,8 @@ export interface KryptonContext {
36
}
37
38
async function standByForPoxToBeReady(client: StacksCoreRpcClient): Promise<void> {
39
+ const maxFailures = 10;
40
+ let failures = 0;
41
while (true) {
42
try {
43
const poxInfo = await client.getPox();
@@ -44,6 +46,10 @@ async function standByForPoxToBeReady(client: StacksCoreRpcClient): Promise<void
44
46
45
47
break;
48
} catch (error) {
49
+ failures += 1;
50
+ if (failures >= maxFailures) {
51
+ throw error;
52
+ }
53
console.log(`Waiting on PoX-4 to be ready, retrying after ${error}`);
54
await timeout(500);
55
0 commit comments