| 676 | } |
| 677 | |
| 678 | static struct command_result *json_upgradewallet(struct command *cmd, |
| 679 | const char *buffer, |
| 680 | const jsmntok_t *params) |
| 681 | { |
| 682 | bool *reservedok; |
| 683 | struct out_req *req; |
| 684 | struct listfunds_info *info = tal(cmd, struct listfunds_info); |
| 685 | |
| 686 | if (!param(cmd, buffer, params, |
| 687 | p_opt("feerate", param_string, &info->feerate), |
| 688 | p_opt_def("reservedok", param_bool, &reservedok, false), |
| 689 | NULL)) |
| 690 | return command_param_failed(); |
| 691 | |
| 692 | info->reservedok = *reservedok; |
| 693 | /* Get an address to send everything to */ |
| 694 | req = jsonrpc_request_start(cmd, |
| 695 | "newaddr", |
| 696 | newaddr_sweep_done, |
| 697 | forward_error, |
| 698 | info); |
| 699 | json_add_string(req->js, "addresstype", "all"); |
| 700 | return send_outreq(req); |
| 701 | } |
| 702 | |
| 703 | static const struct plugin_command commands[] = { |
| 704 | { |
nothing calls this directly
no test coverage detected