| 1059 | } |
| 1060 | |
| 1061 | static struct command_result * |
| 1062 | fundchannel_start_err(struct command *cmd, |
| 1063 | const char *buf, |
| 1064 | const jsmntok_t *error, |
| 1065 | struct multifundchannel_destination *dest) |
| 1066 | { |
| 1067 | plugin_log(dest->mfc->cmd->plugin, LOG_DBG, |
| 1068 | "mfc %"PRIu64", dest %u: " |
| 1069 | "failed! fundchannel_start %s: %.*s.", |
| 1070 | dest->mfc->id, dest->index, |
| 1071 | node_id_to_hexstr(tmpctx, &dest->id), |
| 1072 | json_tok_full_len(error), |
| 1073 | json_tok_full(buf, error)); |
| 1074 | /* |
| 1075 | You might be wondering why we do not just use |
| 1076 | mfc_forward_error here. |
| 1077 | The reason is that other `fundchannel_start` |
| 1078 | commands are running in the meantime, |
| 1079 | and it is still ambiguous whether the opening |
| 1080 | of other destinations was started or not. |
| 1081 | |
| 1082 | After all parallel `fundchannel_start`s have |
| 1083 | completed, we can then fail. |
| 1084 | */ |
| 1085 | |
| 1086 | fail_destination_tok(dest, buf, error); |
| 1087 | return fundchannel_start_done(dest); |
| 1088 | } |
| 1089 | |
| 1090 | static void |
| 1091 | fundchannel_start_dest(struct multifundchannel_destination *dest) |
nothing calls this directly
no test coverage detected