df: add doc for channel_open_failed notification

When a channel fails, send out a notification.

We were missing this notification in one case, which has been added.
This commit is contained in:
niftynei
2021-03-10 21:59:50 -06:00
committed by Rusty Russell
parent fc9e72b62b
commit 52b5dbb01d
2 changed files with 15 additions and 0 deletions

View File

@@ -339,6 +339,20 @@ into a block.
}
```
### `channel_open_failed`
A notification to indicate that a channel open attempt has been unsuccessful.
Useful for cleaning up state for a v2 channel open attempt. See
`tests/plugins/df_accepter.py` for an example of how to use this.
```json
{
"channel_open_failed": {
"channel_id": "a2d0851832f0e30a0cf...",
}
}
```
### `channel_state_changed`
A notification for topic `channel_state_changed` is sent every time a channel

View File

@@ -2450,6 +2450,7 @@ static void handle_commit_received(struct subd *dualopend,
"Bad WIRE_DUALOPEND_COMMIT_RCVD: %s",
tal_hex(msg, msg));
channel->open_attempt = tal_free(channel->open_attempt);
notify_channel_open_failed(channel->peer->ld, &channel->cid);
return;
}