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

Function signpsbt_done

plugins/spender/openchannel.c:1064–1079  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1062}
1063
1064static struct command_result *signpsbt_done(struct command *aux_cmd,
1065 const char *methodname,
1066 const char *buf,
1067 const jsmntok_t *result,
1068 struct channel_id *cid)
1069{
1070 const jsmntok_t *psbttok = json_get_member(buf, result, "signed_psbt");
1071 struct wally_psbt *psbt = json_to_psbt(tmpctx, buf, psbttok);
1072 struct out_req *req;
1073
1074 req = jsonrpc_request_start(aux_cmd, "sendpsbt",
1075 sendpsbt_done, psbt_error,
1076 cid);
1077 json_add_psbt(req->js, "psbt", psbt);
1078 return send_outreq(req);
1079}
1080
1081/* If there are any channels with unsigned PSBTs in AWAITING_LOCKIN,
1082 * sign them now (assume we crashed) */

Callers

nothing calls this directly

Calls 4

json_get_memberFunction · 0.85
json_to_psbtFunction · 0.85
json_add_psbtFunction · 0.85
send_outreqFunction · 0.50

Tested by

no test coverage detected