Skip to main content

validate_weight_temper

Function validate_weight_temper 

Source
fn validate_weight_temper(temper: f64) -> Result<(), ValidationError>
Expand description

Rejects a temper exponent outside (0, 1].

w^γ is only a flattening of the weights for γ ∈ (0, 1].

γ > 1 would sharpen instead — concentrating harder than raw path value, the opposite of the knob’s purpose — and γ <= 0 inverts or annihilates the ordering, sending traffic preferentially to the worst relays. Both are almost certainly typos, so refuse them rather than silently degrade every return path the node builds.