Do these two ranges overlap? If so, return that range. */
| 446 | |
| 447 | /* Do these two ranges overlap? If so, return that range. */ |
| 448 | static bool get_overlap(const struct tlv_closing_signed_tlvs_fee_range *r1, |
| 449 | const struct tlv_closing_signed_tlvs_fee_range *r2, |
| 450 | struct tlv_closing_signed_tlvs_fee_range *overlap) |
| 451 | { |
| 452 | if (amount_sat_greater(r1->min_fee_satoshis, r2->min_fee_satoshis)) |
| 453 | overlap->min_fee_satoshis = r1->min_fee_satoshis; |
| 454 | else |
| 455 | overlap->min_fee_satoshis = r2->min_fee_satoshis; |
| 456 | if (amount_sat_less(r1->max_fee_satoshis, r2->max_fee_satoshis)) |
| 457 | overlap->max_fee_satoshis = r1->max_fee_satoshis; |
| 458 | else |
| 459 | overlap->max_fee_satoshis = r2->max_fee_satoshis; |
| 460 | |
| 461 | return amount_sat_less_eq(overlap->min_fee_satoshis, |
| 462 | overlap->max_fee_satoshis); |
| 463 | } |
| 464 | |
| 465 | /* Is this amount in this range? */ |
| 466 | static bool amount_in_range(struct amount_sat amount, |
no test coverage detected