| 625 | } |
| 626 | |
| 627 | static u32 calc_feerate(struct amount_sat excess_sats, |
| 628 | struct amount_sat output_sats_required, |
| 629 | size_t weight) |
| 630 | { |
| 631 | struct amount_sat fee; |
| 632 | u32 feerate; |
| 633 | |
| 634 | if (!amount_sat_sub(&fee, excess_sats, output_sats_required)) |
| 635 | return 0; |
| 636 | if (!amount_feerate(&feerate, fee, weight)) |
| 637 | abort(); |
| 638 | return feerate; |
| 639 | } |
| 640 | |
| 641 | /* Gather enough utxos to meet feerate, otherwise all we can. */ |
| 642 | struct utxo **wallet_utxo_boost(const tal_t *ctx, |
no test coverage detected