| 380 | } |
| 381 | |
| 382 | static struct command_result * |
| 383 | openchannel_signed_ok(struct command *cmd, |
| 384 | const char *method, |
| 385 | const char *buf, |
| 386 | const jsmntok_t *result, |
| 387 | struct multifundchannel_destination *dest) |
| 388 | { |
| 389 | struct multifundchannel_command *mfc = dest->mfc; |
| 390 | |
| 391 | plugin_log(mfc->cmd->plugin, LOG_DBG, |
| 392 | "mfc %"PRIu64", dest %u: `openchannel_signed` done", |
| 393 | mfc->id, dest->index); |
| 394 | |
| 395 | /* One of the other commands might have landed here first */ |
| 396 | if (!mfc->final_tx) { |
| 397 | const jsmntok_t *tx_tok, *txid_tok; |
| 398 | |
| 399 | tx_tok = json_get_member(buf, result, "tx"); |
| 400 | if (!tx_tok) |
| 401 | plugin_err(mfc->cmd->plugin, |
| 402 | "`openchannel_signed` has no 'tx': %.*s", |
| 403 | json_tok_full_len(result), |
| 404 | json_tok_full(buf, result)); |
| 405 | |
| 406 | mfc->final_tx = json_strdup(mfc, buf, tx_tok); |
| 407 | |
| 408 | txid_tok = json_get_member(buf, result, "txid"); |
| 409 | if (!txid_tok) |
| 410 | plugin_err(mfc->cmd->plugin, |
| 411 | "`openchannel_signed` has no 'txid': %.*s", |
| 412 | json_tok_full_len(result), |
| 413 | json_tok_full(buf, result)); |
| 414 | |
| 415 | mfc->final_txid = json_strdup(mfc, buf, txid_tok); |
| 416 | } |
| 417 | |
| 418 | /* We done !? */ |
| 419 | dest->psbt = tal_free(dest->psbt); |
| 420 | return after_openchannel_signed(mfc); |
| 421 | } |
| 422 | |
| 423 | static struct command_result * |
| 424 | openchannel_signed_err(struct command *cmd, |
nothing calls this directly
no test coverage detected