2022-07-19 17:04:35 +09:30
|
|
|
#ifndef LIGHTNING_PLUGINS_BKPR_ACCOUNT_ENTRY_H
|
|
|
|
#define LIGHTNING_PLUGINS_BKPR_ACCOUNT_ENTRY_H
|
|
|
|
#include "config.h"
|
|
|
|
|
bkpr: track channel rebalances, display in listincome
Track rebalances, and report income events for them.
Previously `listincome` would report:
- invoice event, debit, outgoing channel
- invoice_fee event, debit, outgoing channel
- invoice event, credit, inbound channel
Now reports:
- rebalance_fee, debit, outgoing channel
(same value as invoice_fee above)
Note: only applies on channel events; if a rebalance falls to chain
we'll use the older style of accounting.
Changelog-None
2022-07-31 16:55:58 -05:00
|
|
|
#define NUM_ACCOUNT_ENTRY_TAGS (REBALANCEFEE + 1)
|
2022-07-19 17:04:35 +09:30
|
|
|
enum account_entry_tag {
|
|
|
|
JOURNAL_ENTRY = 0,
|
2022-07-19 17:04:36 +09:30
|
|
|
PENALTY_ADJ = 1,
|
2022-07-19 17:04:38 +09:30
|
|
|
INVOICEFEE = 2,
|
bkpr: track channel rebalances, display in listincome
Track rebalances, and report income events for them.
Previously `listincome` would report:
- invoice event, debit, outgoing channel
- invoice_fee event, debit, outgoing channel
- invoice event, credit, inbound channel
Now reports:
- rebalance_fee, debit, outgoing channel
(same value as invoice_fee above)
Note: only applies on channel events; if a rebalance falls to chain
we'll use the older style of accounting.
Changelog-None
2022-07-31 16:55:58 -05:00
|
|
|
REBALANCEFEE= 3,
|
2022-07-19 17:04:35 +09:30
|
|
|
};
|
|
|
|
|
|
|
|
/* Convert an enum into a string */
|
|
|
|
const char *account_entry_tag_str(enum account_entry_tag tag);
|
|
|
|
|
|
|
|
/* True if entry tag found, false otherwise */
|
|
|
|
bool account_entry_tag_find(char *str, enum account_entry_tag *tag);
|
|
|
|
#endif /* LIGHTNING_PLUGINS_BKPR_ACCOUNT_ENTRY_H */
|