| 1349 | } |
| 1350 | |
| 1351 | static struct command_result * |
| 1352 | json_funderupdate(struct command *cmd, |
| 1353 | const char *buf, |
| 1354 | const jsmntok_t *params) |
| 1355 | { |
| 1356 | struct amount_sat *min_their_funding, *max_their_funding, |
| 1357 | *per_channel_min, *per_channel_max, |
| 1358 | *reserve_tank, *lease_fee_sats; |
| 1359 | struct amount_msat *channel_fee_msats; |
| 1360 | u32 *fuzz_factor, *fund_probability, *chan_fee_ppt, |
| 1361 | *lease_fee_basis, *funding_weight; |
| 1362 | u64 *mod; |
| 1363 | bool *leases_only; |
| 1364 | enum funder_opt *opt; |
| 1365 | const struct out_req *req; |
| 1366 | const char *err; |
| 1367 | struct command_result *res; |
| 1368 | struct funder_policy *policy = tal(cmd, struct funder_policy); |
| 1369 | |
| 1370 | if (!param(cmd, buf, params, |
| 1371 | p_opt_def("policy", param_funder_opt, &opt, |
| 1372 | current_policy->opt), |
| 1373 | p_opt_def("policy_mod", param_policy_mod, &mod, |
| 1374 | current_policy->mod), |
| 1375 | p_opt_def("leases_only", param_bool, &leases_only, |
| 1376 | current_policy->leases_only), |
| 1377 | p_opt_def("min_their_funding_msat", param_msat_as_sat, |
| 1378 | &min_their_funding, |
| 1379 | current_policy->min_their_funding), |
| 1380 | p_opt_def("max_their_funding_msat", param_msat_as_sat, |
| 1381 | &max_their_funding, |
| 1382 | current_policy->max_their_funding), |
| 1383 | p_opt_def("per_channel_min_msat", param_msat_as_sat, |
| 1384 | &per_channel_min, |
| 1385 | current_policy->per_channel_min), |
| 1386 | p_opt_def("per_channel_max_msat", param_msat_as_sat, |
| 1387 | &per_channel_max, |
| 1388 | current_policy->per_channel_max), |
| 1389 | p_opt_def("reserve_tank_msat", param_msat_as_sat, &reserve_tank, |
| 1390 | current_policy->reserve_tank), |
| 1391 | p_opt_def("fuzz_percent", param_number, |
| 1392 | &fuzz_factor, |
| 1393 | current_policy->fuzz_factor), |
| 1394 | p_opt_def("fund_probability", param_number, |
| 1395 | &fund_probability, |
| 1396 | current_policy->fund_probability), |
| 1397 | p_opt("lease_fee_base_msat", param_msat_as_sat, &lease_fee_sats), |
| 1398 | p_opt("lease_fee_basis", param_number, &lease_fee_basis), |
| 1399 | p_opt("funding_weight", param_number, &funding_weight), |
| 1400 | p_opt("channel_fee_max_base_msat", param_msat, |
| 1401 | &channel_fee_msats), |
| 1402 | p_opt("channel_fee_max_proportional_thousandths", |
| 1403 | param_number, &chan_fee_ppt), |
| 1404 | NULL)) |
| 1405 | return command_param_failed(); |
| 1406 | |
| 1407 | policy->opt = *opt; |
| 1408 | policy->mod = *mod; |
nothing calls this directly
no test coverage detected