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

Function new_channel_event

plugins/bkpr/channel_event.c:13–33  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11#include <plugins/bkpr/rebalances.h>
12
13struct channel_event *new_channel_event(const tal_t *ctx,
14 const char *tag,
15 struct amount_msat credit,
16 struct amount_msat debit,
17 struct amount_msat fees,
18 const struct sha256 *payment_id TAKES,
19 u32 part_id,
20 u64 timestamp)
21{
22 struct channel_event *ev = tal(ctx, struct channel_event);
23
24 ev->tag = tal_strdup(ev, tag);
25 ev->credit = credit;
26 ev->debit = debit;
27 ev->fees = fees;
28 ev->payment_id = tal_dup_or_null(ev, struct sha256, payment_id);
29 ev->part_id = part_id;
30 ev->timestamp = timestamp;
31
32 return ev;
33}
34
35void json_add_channel_event(struct json_stream *out,
36 const struct bkpr *bkpr,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected