| 11 | #include <plugins/bkpr/rebalances.h> |
| 12 | |
| 13 | struct 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 | |
| 35 | void json_add_channel_event(struct json_stream *out, |
| 36 | const struct bkpr *bkpr, |
nothing calls this directly
no outgoing calls
no test coverage detected