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

Function new_channel_event

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

Source from the content-addressed store, hash-verified

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

Callers 4

log_journal_entryFunction · 0.70
json_balance_snapshotFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected