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

Function sendpsbt_done

plugins/txprepare.c:165–180  ·  view source on GitHub ↗

Called after lightningd has broadcast the transaction. */

Source from the content-addressed store, hash-verified

163
164/* Called after lightningd has broadcast the transaction. */
165static struct command_result *sendpsbt_done(struct command *cmd,
166 const char *method,
167 const char *buf,
168 const jsmntok_t *result,
169 struct unreleased_tx *utx)
170{
171 struct json_stream *out;
172
173 out = jsonrpc_stream_success(cmd);
174 json_add_hex_talarr(out, "tx", linearize_wtx(tmpctx, utx->tx));
175 json_add_txid(out, "txid", &utx->txid);
176 json_add_psbt(out, "psbt", utx->psbt);
177 if (utx->is_upgrade)
178 json_add_num(out, "upgraded_outs", utx->tx->num_inputs);
179 return command_finished(cmd, out);
180}
181
182/* Called after lightningd has signed the inputs. */
183static struct command_result *signpsbt_done(struct command *cmd,

Callers

nothing calls this directly

Calls 7

json_add_hex_talarrFunction · 0.85
linearize_wtxFunction · 0.85
json_add_txidFunction · 0.85
json_add_psbtFunction · 0.85
json_add_numFunction · 0.85
jsonrpc_stream_successFunction · 0.70
command_finishedFunction · 0.70

Tested by

no test coverage detected