let channel = chan_lock.by_id.get(&chan.2).unwrap();
htlc_minimum_msat = channel.get_our_htlc_minimum_msat();
}
- let route = nodes[0].router.get_route(&nodes[1].node.get_our_node_id(), None, &[], htlc_minimum_msat+1, TEST_FINAL_CLTV).unwrap();
+ let route = nodes[0].router.get_route(&nodes[1].node.get_our_node_id(), None, &[], htlc_minimum_msat, TEST_FINAL_CLTV).unwrap();
let (_, our_payment_hash) = get_payment_preimage_hash!(nodes[0]);
nodes[0].node.send_payment(route, our_payment_hash).unwrap();
check_added_monitors!(nodes[0], 1);
// $directional_info.
( $chan_id: expr, $dest_node_id: expr, $directional_info: expr, $starting_fee_msat: expr ) => {
//TODO: Explore simply adding fee to hit htlc_minimum_msat
- if $starting_fee_msat as u64 + final_value_msat > $directional_info.htlc_minimum_msat {
+ if $starting_fee_msat as u64 + final_value_msat >= $directional_info.htlc_minimum_msat {
let proportional_fee_millions = ($starting_fee_msat + final_value_msat).checked_mul($directional_info.fee_proportional_millionths as u64);
if let Some(new_fee) = proportional_fee_millions.and_then(|part| {
($directional_info.fee_base_msat as u64).checked_add(part / 1000000) })