mirror of
https://github.com/aljazceru/lightning.git
synced 2026-01-15 12:04:18 +01:00
When we print events out, we need to know the account name. This makes our lookup a lot easier, since we just pull it out from the database every time we query for these.
47 lines
1010 B
C
47 lines
1010 B
C
#ifndef LIGHTNING_PLUGINS_BKPR_CHANNEL_EVENT_H
|
|
#define LIGHTNING_PLUGINS_BKPR_CHANNEL_EVENT_H
|
|
|
|
#include "config.h"
|
|
#include <ccan/short_types/short_types.h>
|
|
|
|
struct amount_msat;
|
|
struct sha256;
|
|
|
|
struct channel_event {
|
|
|
|
/* Id of this chain event in the database */
|
|
u64 db_id;
|
|
|
|
/* db_id of account this event belongs to */
|
|
u64 acct_db_id;
|
|
|
|
/* Name of the account this belongs to */
|
|
char *acct_name;
|
|
|
|
/* Tag describing the event */
|
|
const char *tag;
|
|
|
|
/* Amount we received in this event */
|
|
struct amount_msat credit;
|
|
|
|
/* Amount we paid in this event */
|
|
struct amount_msat debit;
|
|
|
|
/* Total 'fees' related to this channel event */
|
|
struct amount_msat fees;
|
|
|
|
/* What token are the credit/debits? */
|
|
const char *currency;
|
|
|
|
/* Payment identifier (typically the preimage hash) */
|
|
struct sha256 *payment_id;
|
|
|
|
/* Some payments share a payment_id, and are differentiable via id */
|
|
u32 part_id;
|
|
|
|
/* What time did the event happen */
|
|
u64 timestamp;
|
|
};
|
|
|
|
#endif /* LIGHTNING_PLUGINS_BKPR_CHANNEL_EVENT_H */
|