Does this input give enough to provide fee for output? */
| 641 | |
| 642 | /* Does this input give enough to provide fee for output? */ |
| 643 | static bool within_fee(struct amount_msat in, |
| 644 | struct amount_msat out, |
| 645 | u32 fee_base_msat, |
| 646 | u32 fee_proportional_millionths) |
| 647 | { |
| 648 | struct amount_msat with_fee = out; |
| 649 | if (!amount_msat_add_fee(&with_fee, |
| 650 | fee_base_msat, |
| 651 | fee_proportional_millionths)) |
| 652 | return false; |
| 653 | return amount_msat_less_eq(with_fee, in); |
| 654 | } |
| 655 | |
| 656 | struct amount_msat amount_msat_sub_fee(struct amount_msat in, |
| 657 | u32 fee_base_msat, |
no test coverage detected