78 i = null
79 nonce = 0
80 e = BigInteger.fromBuffer(buf_sha256)
81 while (true) { 82 ecsignature = ecdsa.sign(curve, buf_sha256, private_key.d, nonce++)
83 der = ecsignature.toDER()
84 lenR = der[3]
172 }
173 await sleep(backoff(tries++));
174 }
175 } while (true);176}
177
178const failover = (
102
103 const run = async () => {
104 try {
105 while (true) {106 await iter.next();
107 }
108 } catch (error) {
A constant expression such as a literal when used as a condition in an if
/ for
/ while
or do...while
statement can cause errors in a production environment.
Usage of such constructs in a development environment for debugging triggers is common, but it's not a good practice to push them to VCS.
if (false) {
doSomethingUnfinished();
}
if (void x) {
doSomethingUnfinished();
}
for (;-2;) {
doSomethingForever();
}
while (typeof x) {
doSomethingForever();
}
do {
doSomethingForever();
} while (x = -1);
const result = 0 ? a : b;
if (foo()) {
doSomethingUnfinished();
}
for (let i = 0; i < foo; ++i) {
doSomethingForever();
}
while (true) {
doSomethingForever();
}
do {
doSomethingForever();
} while (x == -1);
const result = cond() ? a : b;