| 520 | } |
| 521 | |
| 522 | static struct command_result * |
| 523 | after_sendpsbt(struct command *cmd, |
| 524 | const char *method, |
| 525 | const char *buf, |
| 526 | const jsmntok_t *result, |
| 527 | struct multifundchannel_command *mfc) |
| 528 | { |
| 529 | const jsmntok_t *tx_tok; |
| 530 | const jsmntok_t *txid_tok; |
| 531 | |
| 532 | plugin_log(mfc->cmd->plugin, LOG_DBG, |
| 533 | "mfc %"PRIu64": sendpsbt done.", mfc->id); |
| 534 | |
| 535 | tx_tok = json_get_member(buf, result, "tx"); |
| 536 | if (!tx_tok) |
| 537 | plugin_err(cmd->plugin, |
| 538 | "sendpsbt response has no 'tx': %.*s", |
| 539 | json_tok_full_len(result), |
| 540 | json_tok_full(buf, result)); |
| 541 | mfc->final_tx = json_strdup(mfc, buf, tx_tok); |
| 542 | |
| 543 | txid_tok = json_get_member(buf, result, "txid"); |
| 544 | if (!txid_tok) |
| 545 | plugin_err(cmd->plugin, |
| 546 | "sendpsbt response has no 'txid': %.*s", |
| 547 | json_tok_full_len(result), |
| 548 | json_tok_full(buf, result)); |
| 549 | mfc->final_txid = json_strdup(mfc, buf, txid_tok); |
| 550 | |
| 551 | /* PSBT is no longer something we need to clean up. */ |
| 552 | mfc->psbt = tal_free(mfc->psbt); |
| 553 | |
| 554 | return multifundchannel_finished(mfc); |
| 555 | } |
| 556 | |
| 557 | static struct command_result * |
| 558 | after_signpsbt(struct command *cmd, |
nothing calls this directly
no test coverage detected