| 52 | } |
| 53 | |
| 54 | static struct funder_policy * |
| 55 | new_funder_policy(const tal_t *ctx, |
| 56 | enum funder_opt opt, |
| 57 | u64 policy_mod, |
| 58 | struct amount_sat min_their_funding, |
| 59 | struct amount_sat max_their_funding, |
| 60 | struct amount_sat per_channel_min, |
| 61 | struct amount_sat per_channel_max, |
| 62 | u32 fuzz_factor, |
| 63 | struct amount_sat reserve_tank, |
| 64 | u32 fund_probability, |
| 65 | bool leases_only, |
| 66 | struct lease_rates *rates) |
| 67 | { |
| 68 | struct funder_policy *policy = tal(ctx, struct funder_policy); |
| 69 | |
| 70 | policy->opt = opt; |
| 71 | policy->mod = policy_mod; |
| 72 | policy->min_their_funding = min_their_funding; |
| 73 | policy->max_their_funding = max_their_funding; |
| 74 | policy->per_channel_min = per_channel_min; |
| 75 | policy->per_channel_max = per_channel_max; |
| 76 | policy->fuzz_factor = fuzz_factor; |
| 77 | policy->reserve_tank = reserve_tank; |
| 78 | policy->fund_probability = fund_probability; |
| 79 | policy->leases_only = leases_only; |
| 80 | policy->rates = rates; |
| 81 | |
| 82 | return policy; |
| 83 | } |
| 84 | |
| 85 | struct funder_policy * |
| 86 | default_funder_policy(const tal_t *ctx, |
no outgoing calls
no test coverage detected