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

Function after_sendpsbt

plugins/spender/multifundchannel.c:513–545  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

511}
512
513static struct command_result *
514after_sendpsbt(struct command *cmd,
515 const char *buf,
516 const jsmntok_t *result,
517 struct multifundchannel_command *mfc)
518{
519 const jsmntok_t *tx_tok;
520 const jsmntok_t *txid_tok;
521
522 plugin_log(mfc->cmd->plugin, LOG_DBG,
523 "mfc %"PRIu64": sendpsbt done.", mfc->id);
524
525 tx_tok = json_get_member(buf, result, "tx");
526 if (!tx_tok)
527 plugin_err(cmd->plugin,
528 "sendpsbt response has no 'tx': %.*s",
529 json_tok_full_len(result),
530 json_tok_full(buf, result));
531 mfc->final_tx = json_strdup(mfc, buf, tx_tok);
532
533 txid_tok = json_get_member(buf, result, "txid");
534 if (!txid_tok)
535 plugin_err(cmd->plugin,
536 "sendpsbt response has no 'txid': %.*s",
537 json_tok_full_len(result),
538 json_tok_full(buf, result));
539 mfc->final_txid = json_strdup(mfc, buf, txid_tok);
540
541 /* PSBT is no longer something we need to clean up. */
542 mfc->psbt = tal_free(mfc->psbt);
543
544 return multifundchannel_finished(mfc);
545}
546
547static struct command_result *
548after_signpsbt(struct command *cmd,

Callers

nothing calls this directly

Calls 8

tal_freeFunction · 0.85
plugin_logFunction · 0.50
json_get_memberFunction · 0.50
plugin_errFunction · 0.50
json_tok_full_lenFunction · 0.50
json_tok_fullFunction · 0.50
json_strdupFunction · 0.50

Tested by

no test coverage detected