- 11 => update_opt.is_ok() &&
- amt_to_forward >
- update_opt.as_ref().unwrap().contents.htlc_minimum_msat,
- 12 => update_opt.is_ok() && amt_to_forward
- .checked_mul(update_opt.as_ref().unwrap()
- .contents.fee_proportional_millionths as u64)
- .map(|prop_fee| prop_fee / 1_000_000)
- .and_then(|prop_fee| prop_fee.checked_add(
- update_opt.as_ref().unwrap().contents.fee_base_msat as u64))
- .map(|fee_msats| route_hop.fee_msat >= fee_msats)
- .unwrap_or(false),
- 13 => update_opt.is_ok() &&
- route_hop.cltv_expiry_delta as u16 >=
- update_opt.as_ref().unwrap().contents.cltv_expiry_delta,
+ 11 => {
+ update_opt.is_ok()
+ && amt_to_forward
+ > update_opt.as_ref().unwrap().contents.htlc_minimum_msat
+ },
+ 12 => {
+ update_opt.is_ok()
+ && amt_to_forward
+ .checked_mul(
+ update_opt
+ .as_ref()
+ .unwrap()
+ .contents
+ .fee_proportional_millionths as u64,
+ )
+ .map(|prop_fee| prop_fee / 1_000_000)
+ .and_then(|prop_fee| {
+ prop_fee.checked_add(
+ update_opt.as_ref().unwrap().contents.fee_base_msat
+ as u64,
+ )
+ })
+ .map(|fee_msats| route_hop.fee_msat >= fee_msats)
+ .unwrap_or(false)
+ },
+ 13 => {
+ update_opt.is_ok()
+ && route_hop.cltv_expiry_delta as u16
+ >= update_opt.as_ref().unwrap().contents.cltv_expiry_delta
+ },