nearestPowerOfTwo

This commit is contained in:
Ben Wilson 2023-08-06 22:58:54 -04:00
parent 3ec444af48
commit 72d2f63315

View File

@ -88,6 +88,9 @@ export class StratumV1ClientStatistics {
x = x | (x >> 16);
x = x | (x >> 32);
const res = x - (x >> 1);
if (res == 0 && val * 100 < MIN_DIFF) {
return MIN_DIFF;
}
if (res == 0) {
return this.nearestPowerOfTwo(val * 100) / 100;
}