| 1222 | struct rbf_channel_payload *); |
| 1223 | |
| 1224 | static bool feerate_satisfied(struct wally_psbt *psbt, |
| 1225 | u32 funding_feerate) |
| 1226 | { |
| 1227 | struct wally_tx *wtx; |
| 1228 | size_t tx_weight; |
| 1229 | struct amount_sat fee_paid, expected_fee; |
| 1230 | |
| 1231 | wtx = psbt_final_tx(NULL, psbt); |
| 1232 | tx_weight = wally_tx_weight(wtx); |
| 1233 | tal_free(wtx); |
| 1234 | |
| 1235 | fee_paid = psbt_compute_fee(psbt); |
| 1236 | expected_fee = amount_tx_fee(funding_feerate, tx_weight); |
| 1237 | |
| 1238 | return amount_sat_greater_eq(fee_paid, expected_fee); |
| 1239 | } |
| 1240 | |
| 1241 | static struct amount_sat calculate_reserve(struct channel_config *their_config, |
| 1242 | struct amount_sat funding_total, |
no test coverage detected