Files
palladum-lightning/plugins/bkpr/onchain_fee.h
Rusty Russell b1fa2ef30b bkpr: remove different currency support.
We still output the fields, they're just always the currency of the node.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Changed: Plugins: `bookkeeper` now explicitly assumes every transaction is in the same currency as the node (true unless you added manually)
2025-08-14 19:49:09 +09:30

37 lines
826 B
C

#ifndef LIGHTNING_PLUGINS_BKPR_ONCHAIN_FEE_H
#define LIGHTNING_PLUGINS_BKPR_ONCHAIN_FEE_H
#include "config.h"
#include <bitcoin/tx.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;
/* Timestamp of the event that created this fee update */
u64 timestamp;
/* Count of records we've recorded for this tx */
u32 update_count;
};
void json_add_onchain_fee(struct json_stream *out,
struct onchain_fee *fee);
#endif /* LIGHTNING_PLUGINS_BKPR_ONCHAIN_FEE_H */