| 100 | } |
| 101 | |
| 102 | struct lease_rates * |
| 103 | default_lease_rates(const tal_t *ctx) |
| 104 | { |
| 105 | struct lease_rates *rates = tal(ctx, struct lease_rates); |
| 106 | |
| 107 | /* Default basis is .65%, (7.8% APR) */ |
| 108 | rates->lease_fee_basis = 65; |
| 109 | /* 2000sat base rate */ |
| 110 | rates->lease_fee_base_sat = 2000; |
| 111 | /* Max of 100,000ppm (10%) */ |
| 112 | rates->channel_fee_max_proportional_thousandths = 100; |
| 113 | /* Max of 5000sat */ |
| 114 | rates->channel_fee_max_base_msat = 5000000; |
| 115 | |
| 116 | /* Let's set our default max weight to two inputs + an output |
| 117 | * (use helpers b/c elements) */ |
| 118 | rates->funding_weight |
| 119 | = 2 * bitcoin_tx_simple_input_weight(false) |
| 120 | + bitcoin_tx_output_weight(BITCOIN_SCRIPTPUBKEY_P2WPKH_LEN); |
| 121 | |
| 122 | return rates; |
| 123 | } |
| 124 | |
| 125 | char *funder_check_policy(const struct funder_policy *policy) |
| 126 | { |
no test coverage detected