chanmgr padding: Fix low vs high comparison

Whoops.  This bug was completely masked by the fact that we don't
actually enable padding yet.
This commit is contained in:
Ian Jackson 2022-07-27 13:09:15 +01:00
parent 0b140effc6
commit 1688b5ef2a
1 changed files with 2 additions and 3 deletions

View File

@ -418,9 +418,8 @@ fn padding_parameters(
|index: usize| nf_ito[index].try_map(|bounded| bounded.get().try_into());
let low = get_timing_param(0).map_err(|_| "low value arithmetic overflow?!")?;
let high = get_timing_param(1).map_err(|_| "high value arithmetic overflow?!")?;
if high > low {
return Err("high > low");
if low > high {
return Err("low > high");
}
p.low_ms(low);
p.high_ms(high);