Fixes a bug in stabilizer power calculation (#29079)

This commit is contained in:
Migratingcocofruit
2025-05-14 01:23:39 +03:00
committed by GitHub
parent 95480716fb
commit 56da182eb1
+1 -1
View File
@@ -291,7 +291,7 @@
// Lowest between enough to stabilize our desired mining power and enough to stabilize the highest mining power we could sustain with our current power budget.
stabilizer_power =\
min(max(mining_power - max(NEAREST_MW(mining_power / 2), NEAREST_MW((mining_power + 30 MW) / 3)), 0), \
clamp(desired_mining_power - clamp((30 MW) - desired_mining_power, 0, 15 MW), 0, desired_mining_power / 2))
clamp(desired_mining_power - clamp((30 MW) - desired_mining_power, 0, 15 MW), 0, desired_mining_power))
// Stabilizers take priority so we subtract them from the available total straight away
mining_power = mining_power - stabilizer_power