| 788 | } |
| 789 | |
| 790 | static void json_add_policy(struct json_stream *stream, |
| 791 | struct funder_policy *policy) |
| 792 | { |
| 793 | json_add_string(stream, "summary", |
| 794 | funder_policy_desc(stream, current_policy)); |
| 795 | json_add_string(stream, "policy", |
| 796 | funder_opt_name(policy->opt)); |
| 797 | json_add_num(stream, "policy_mod", policy->mod); |
| 798 | json_add_bool(stream, "leases_only", policy->leases_only); |
| 799 | json_add_amount_sat_msat(stream, "min_their_funding_msat", |
| 800 | policy->min_their_funding); |
| 801 | json_add_amount_sat_msat(stream, "max_their_funding_msat", |
| 802 | policy->max_their_funding); |
| 803 | json_add_amount_sat_msat(stream, "per_channel_min_msat", |
| 804 | policy->per_channel_min); |
| 805 | json_add_amount_sat_msat(stream, "per_channel_max_msat", |
| 806 | policy->per_channel_max); |
| 807 | json_add_amount_sat_msat(stream, "reserve_tank_msat", |
| 808 | policy->reserve_tank); |
| 809 | json_add_num(stream, "fuzz_percent", policy->fuzz_factor); |
| 810 | json_add_num(stream, "fund_probability", policy->fund_probability); |
| 811 | |
| 812 | if (policy->rates) { |
| 813 | json_add_lease_rates(stream, policy->rates); |
| 814 | json_add_string(stream, "compact_lease", |
| 815 | lease_rates_tohex(tmpctx, policy->rates)); |
| 816 | } |
| 817 | } |
| 818 | |
| 819 | static struct command_result * |
| 820 | param_funder_opt(struct command *cmd, const char *name, |
no test coverage detected