| 7 | #include <plugins/bkpr/channel_event.h> |
| 8 | |
| 9 | struct 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 | |
| 35 | void json_add_channel_event(struct json_stream *out, |
| 36 | struct channel_event *ev) |
no outgoing calls
no test coverage detected