| 1206 | } |
| 1207 | |
| 1208 | static void json_add_policy(struct json_stream *stream, |
| 1209 | struct funder_policy *policy) |
| 1210 | { |
| 1211 | json_add_string(stream, "summary", |
| 1212 | funder_policy_desc(stream, current_policy)); |
| 1213 | json_add_string(stream, "policy", |
| 1214 | funder_opt_name(policy->opt)); |
| 1215 | json_add_num(stream, "policy_mod", policy->mod); |
| 1216 | json_add_bool(stream, "leases_only", policy->leases_only); |
| 1217 | json_add_amount_sat_msat(stream, "min_their_funding_msat", |
| 1218 | policy->min_their_funding); |
| 1219 | json_add_amount_sat_msat(stream, "max_their_funding_msat", |
| 1220 | policy->max_their_funding); |
| 1221 | json_add_amount_sat_msat(stream, "per_channel_min_msat", |
| 1222 | policy->per_channel_min); |
| 1223 | json_add_amount_sat_msat(stream, "per_channel_max_msat", |
| 1224 | policy->per_channel_max); |
| 1225 | json_add_amount_sat_msat(stream, "reserve_tank_msat", |
| 1226 | policy->reserve_tank); |
| 1227 | json_add_num(stream, "fuzz_percent", policy->fuzz_factor); |
| 1228 | json_add_num(stream, "fund_probability", policy->fund_probability); |
| 1229 | |
| 1230 | if (policy->rates) { |
| 1231 | json_add_lease_rates(stream, policy->rates); |
| 1232 | json_add_string(stream, "compact_lease", |
| 1233 | lease_rates_tohex(tmpctx, policy->rates)); |
| 1234 | } |
| 1235 | } |
| 1236 | |
| 1237 | static struct command_result * |
| 1238 | param_funder_opt(struct command *cmd, const char *name, |
no test coverage detected