MCPcopy Create free account
hub / github.com/ElementsProject/lightning / json_upgradewallet

Function json_upgradewallet

plugins/txprepare.c:678–701  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

676}
677
678static 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
703static const struct plugin_command commands[] = {
704 {

Callers

nothing calls this directly

Calls 4

command_param_failedFunction · 0.70
send_outreqFunction · 0.70
paramFunction · 0.50
json_add_stringFunction · 0.50

Tested by

no test coverage detected