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

Function new_channel_subd_

lightningd/subd.c:804–832  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

802}
803
804struct subd *new_channel_subd_(const tal_t *ctx,
805 struct lightningd *ld,
806 const char *name,
807 void *channel,
808 const struct node_id *node_id,
809 struct log *base_log,
810 bool talks_to_peer,
811 const char *(*msgname)(int msgtype),
812 unsigned int (*msgcb)(struct subd *, const u8 *,
813 const int *fds),
814 void (*errcb)(void *channel,
815 struct peer_fd *peer_fd,
816 const struct channel_id *channel_id,
817 const char *desc,
818 bool warning,
819 const u8 *err_for_them),
820 void (*billboardcb)(void *channel, bool perm,
821 const char *happenings),
822 ...)
823{
824 va_list ap;
825 struct subd *sd;
826
827 va_start(ap, billboardcb);
828 sd = new_subd(ctx, ld, name, channel, node_id, base_log,
829 talks_to_peer, msgname, msgcb, errcb, billboardcb, &ap);
830 va_end(ap);
831 return sd;
832}
833
834void subd_send_msg(struct subd *sd, const u8 *msg_out)
835{

Callers

nothing calls this directly

Calls 1

new_subdFunction · 0.70

Tested by

no test coverage detected