| 1156 | struct rbf_channel_payload *); |
| 1157 | |
| 1158 | static bool feerate_satisfied(struct wally_psbt *psbt, |
| 1159 | u32 funding_feerate) |
| 1160 | { |
| 1161 | struct wally_tx *wtx; |
| 1162 | size_t tx_weight; |
| 1163 | struct amount_sat fee_paid, expected_fee; |
| 1164 | |
| 1165 | wtx = psbt_final_tx(NULL, psbt); |
| 1166 | tx_weight = wally_tx_weight(wtx); |
| 1167 | tal_free(wtx); |
| 1168 | |
| 1169 | fee_paid = psbt_compute_fee(psbt); |
| 1170 | expected_fee = amount_tx_fee(funding_feerate, tx_weight); |
| 1171 | |
| 1172 | return amount_sat_greater_eq(fee_paid, expected_fee); |
| 1173 | } |
| 1174 | |
| 1175 | static struct amount_sat calculate_reserve(struct channel_config *their_config, |
| 1176 | struct amount_sat funding_total, |
no test coverage detected