| 1014 | struct rbf_channel_payload *); |
| 1015 | |
| 1016 | static bool feerate_satisfied(struct wally_psbt *psbt, |
| 1017 | u32 funding_feerate) |
| 1018 | { |
| 1019 | struct wally_tx *wtx; |
| 1020 | size_t tx_weight; |
| 1021 | struct amount_sat fee_paid, expected_fee; |
| 1022 | |
| 1023 | wtx = psbt_final_tx(NULL, psbt); |
| 1024 | tx_weight = wally_tx_weight(wtx); |
| 1025 | tal_free(wtx); |
| 1026 | |
| 1027 | fee_paid = psbt_compute_fee(psbt); |
| 1028 | expected_fee = amount_tx_fee(funding_feerate, tx_weight); |
| 1029 | |
| 1030 | return amount_sat_greater_eq(fee_paid, expected_fee); |
| 1031 | } |
| 1032 | |
| 1033 | static struct amount_sat calculate_reserve(struct channel_config *their_config, |
| 1034 | struct amount_sat funding_total, |
no test coverage detected