MCPcopy Create free account
hub / github.com/ElementsProject/lightning / notify_channel_state_changed

Function notify_channel_state_changed

lightningd/notification.c:268–293  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

266 channel_state_changed_notification_serialize)
267
268void notify_channel_state_changed(struct lightningd *ld,
269 struct node_id *peer_id,
270 struct channel_id *cid,
271 struct short_channel_id *scid,
272 struct timeabs *timestamp,
273 enum channel_state old_state,
274 enum channel_state new_state,
275 enum state_change cause,
276 char *message)
277{
278 void (*serialize)(struct json_stream *,
279 struct node_id *,
280 struct channel_id *,
281 struct short_channel_id *,
282 struct timeabs *timestamp,
283 enum channel_state,
284 enum channel_state,
285 enum state_change,
286 char *message) = channel_state_changed_notification_gen.serialize;
287
288 struct jsonrpc_notification *n
289 = jsonrpc_notification_start(NULL, channel_state_changed_notification_gen.topic);
290 serialize(n->stream, peer_id, cid, scid, timestamp, old_state, new_state, cause, message);
291 jsonrpc_notification_end(n);
292 plugins_notify(ld->plugins, take(n));
293}
294
295static void forward_event_notification_serialize(struct json_stream *stream,
296 const struct htlc_in *in,

Callers 2

channel_set_stateFunction · 0.70
wallet_commit_channelFunction · 0.70

Calls 3

jsonrpc_notification_endFunction · 0.85
plugins_notifyFunction · 0.85

Tested by

no test coverage detected