diff --git a/core/circuit/circuit.go b/core/circuit/circuit.go index 83dc5f4f6..4741982d4 100644 --- a/core/circuit/circuit.go +++ b/core/circuit/circuit.go @@ -340,7 +340,7 @@ func (c *Circuit) ValidateCurrent(old, new float64) float64 { if maxCurrent := c.GetMaxCurrent(); maxCurrent != 0 { delta := max(0, new-old) potential := maxCurrent - c.current - + if delta > potential { capped := max(0, old+potential) c.log.DEBUG.Printf("validate current: %.3gA + (%.3gA -> %.3gA) > %.3gA capped at %.3gA", c.current, old, new, maxCurrent, capped)