core-lightning/plugins/bkpr/onchain_fee.h
niftynei ccffac8208 bkpr: put the account name on the event
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.
2022-07-28 12:08:18 +09:30

35 lines
765 B
C

#ifndef LIGHTNING_PLUGINS_BKPR_ONCHAIN_FEE_H
#define LIGHTNING_PLUGINS_BKPR_ONCHAIN_FEE_H
#include "config.h"
#include <ccan/short_types/short_types.h>
struct amount_msat;
struct bitcoin_txid;
struct onchain_fee {
/* db_id of account this event belongs to */
u64 acct_db_id;
/* Name of the account this belongs to */
char *acct_name;
/* Transaction that we're recording fees for */
struct bitcoin_txid txid;
/* Incremental change in onchain fees */
struct amount_msat credit;
struct amount_msat debit;
/* What token are fees? */
char *currency;
/* Timestamp of the event that created this fee update */
u64 timestamp;
/* Count of records we've recorded for this tx */
u32 update_count;
};
#endif /* LIGHTNING_PLUGINS_BKPR_ONCHAIN_FEE_H */