| 68 | } |
| 69 | |
| 70 | const char *cmd_id_from_close_command(const tal_t *ctx, |
| 71 | struct lightningd *ld, struct channel *channel) |
| 72 | { |
| 73 | struct close_command *cc; |
| 74 | |
| 75 | list_for_each(&ld->close_commands, cc, list) { |
| 76 | if (cc->channel != channel) |
| 77 | continue; |
| 78 | return tal_strdup(ctx, cc->cmd->id); |
| 79 | } |
| 80 | return NULL; |
| 81 | } |
| 82 | |
| 83 | /* Resolve a close command for a channel that will be closed soon. */ |
| 84 | void resolve_close_command(struct lightningd *ld, struct channel *channel, |