| 327 | } |
| 328 | |
| 329 | REGISTER_NOTIFICATION(channel_state_changed) |
| 330 | |
| 331 | void notify_channel_state_changed(struct lightningd *ld, |
| 332 | const struct node_id *peer_id, |
| 333 | const struct channel_id *cid, |
| 334 | const struct short_channel_id *scid, |
| 335 | struct timeabs timestamp, |
| 336 | enum channel_state old_state, |
| 337 | enum channel_state new_state, |
| 338 | enum state_change cause, |
| 339 | const char *message) |
| 340 | { |
| 341 | struct jsonrpc_notification *n = notify_start(ld, "channel_state_changed"); |
| 342 | if (!n) |
| 343 | return; |
| 344 | channel_state_changed_notification_serialize(n->stream, ld, peer_id, cid, scid, timestamp, old_state, new_state, cause, message); |
| 345 | notify_send(ld, n); |
| 346 | } |
| 347 | |
| 348 | static void forward_event_notification_serialize(struct json_stream *stream, |
| 349 | const struct htlc_in *in, |
no test coverage detected