mirror of
https://github.com/ElementsProject/lightning.git
synced 2024-11-20 02:27:51 +01:00
e7ed196f87
For income events, break out the amount paid in routing fees vs the total amount of the *invoice* that is paid. Also printout these fees, when available, on listaccountevents
29 lines
515 B
C
29 lines
515 B
C
#include "config.h"
|
|
|
|
#include <ccan/tal/str/str.h>
|
|
#include <plugins/bkpr/account_entry.h>
|
|
#include <stddef.h>
|
|
|
|
static const char *tags[] = {
|
|
"journal_entry",
|
|
"penalty_adj",
|
|
"invoice_fee",
|
|
};
|
|
|
|
const char *account_entry_tag_str(enum account_entry_tag tag)
|
|
{
|
|
return tags[tag];
|
|
}
|
|
|
|
bool account_entry_tag_find(char *str, enum account_entry_tag *tag)
|
|
{
|
|
for (size_t i = 0; i < NUM_ACCOUNT_ENTRY_TAGS; i++) {
|
|
if (streq(str, tags[i])) {
|
|
*tag = (enum account_entry_tag) i;
|
|
return true;
|
|
}
|
|
}
|
|
|
|
return false;
|
|
}
|