| 511 | } |
| 512 | |
| 513 | static struct command_result * |
| 514 | after_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 | |
| 547 | static struct command_result * |
| 548 | after_signpsbt(struct command *cmd, |
nothing calls this directly
no test coverage detected